質問編集履歴
1
例
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,8 +13,19 @@
|
|
13
13
|
](e7287780a41addc5ead5dfc0fe9be173.png)
|
14
14
|
|
15
15
|
```python
|
16
|
-
|
16
|
+
driver.find_element_by_class_name('revRvwUserEntryTtl')
|
17
17
|
```
|
18
18
|
こうすると、そのページの一番上の太字のところが取れます。
|
19
19
|
しかし、全部のところに'revRvwUserEntryTtl'があるわけでは無いので、'revRvwUserMain'から順番にとっていきたいです。
|
20
|
-
よろしくお願いします。
|
20
|
+
よろしくお願いします。
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
イメージとしては感じでできたら嬉しいです。
|
25
|
+
```python
|
26
|
+
driver.get('https://review.rakuten.co.jp/item/1/213310_19750950/1.1/')
|
27
|
+
items = driver.find_elements_by_class_name('revRvwUserMain')
|
28
|
+
|
29
|
+
for item in items:
|
30
|
+
str = item.find_element_by_class_name('revRvwUserEntryTtl').text
|
31
|
+
```
|