回答編集履歴
1
追記
test
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
サンプル
|
2
|
+
|
3
|
+
|
4
|
+
|
1
5
|
```python
|
2
6
|
|
3
7
|
from selenium import webdriver
|
@@ -40,11 +44,7 @@
|
|
40
44
|
|
41
45
|
|
42
46
|
|
43
|
-
# 送料だけ取り出したい場合seleniumだとわからなかったのでbeautifulsoupで取得
|
44
|
-
|
45
|
-
#
|
47
|
+
# 送料のみ取り出し
|
46
|
-
|
47
|
-
|
48
48
|
|
49
49
|
html = driver.page_source.encode('utf-8')
|
50
50
|
|
@@ -62,10 +62,16 @@
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
+
driver.quit()
|
66
|
+
|
65
|
-
|
67
|
+
```
|
66
68
|
|
67
69
|
|
68
70
|
|
69
|
-
|
71
|
+
seleniumで子要素を取得するのは大変そうなのでbeautifulsoupのでいいかもしれません。
|
70
72
|
|
71
|
-
|
73
|
+
|
74
|
+
|
75
|
+
How to get text of an element in Selenium WebDriver, without including child element text?
|
76
|
+
|
77
|
+
[https://stackoverflow.com/questions/12325454/how-to-get-text-of-an-element-in-selenium-webdriver-without-including-child-ele](https://stackoverflow.com/questions/12325454/how-to-get-text-of-an-element-in-selenium-webdriver-without-including-child-ele)
|