回答編集履歴
2
xpath追記
test
CHANGED
@@ -17,3 +17,15 @@
|
|
17
17
|
#略
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
追記
|
24
|
+
|
25
|
+
xpathで指定するともっと短いです。
|
26
|
+
|
27
|
+
```python
|
28
|
+
|
29
|
+
elem_urls = driver.find_elements_by_xpath("//*[contain(@class, 'UvsinfoBx')]/a/@href")
|
30
|
+
|
31
|
+
```
|
1
コード追加
test
CHANGED
@@ -10,8 +10,10 @@
|
|
10
10
|
|
11
11
|
```python
|
12
12
|
|
13
|
-
urls = [elem.get_attribute('href') for elem in driver.find_elements_by_css_selector('.UvsinfoBx a')]
|
13
|
+
elem_urls = [elem.get_attribute('href') for elem in driver.find_elements_by_css_selector('.UvsinfoBx a')]
|
14
14
|
|
15
|
+
for elem_url in elem_urls:
|
15
16
|
|
17
|
+
#略
|
16
18
|
|
17
19
|
```
|