回答編集履歴
2
Update
test
CHANGED
@@ -10,8 +10,12 @@
|
|
10
10
|
を以下の様に変更(CSS セレクタを使います)。
|
11
11
|
|
12
12
|
```python
|
13
|
-
|
13
|
+
score = soup.select('.voiceDetail-sec02 > table > tr:first-child > th.noBlod:first-child + td')
|
14
|
-
|
14
|
+
scores += [s.text.strip() for s in score]
|
15
|
-
tmp_nam += 1
|
16
|
-
length += 1
|
17
15
|
```
|
16
|
+
|
17
|
+
`length` は for ループを抜けた後に、
|
18
|
+
```python
|
19
|
+
length += len(scores)
|
20
|
+
```
|
21
|
+
とすればよいかと。
|
1
Update
test
CHANGED
@@ -10,8 +10,8 @@
|
|
10
10
|
を以下の様に変更(CSS セレクタを使います)。
|
11
11
|
|
12
12
|
```python
|
13
|
-
score = soup.select
|
13
|
+
score = soup.select('.voiceDetail-sec02 > table > tr:first-child > th.noBlod:first-child + td')
|
14
|
-
scores
|
14
|
+
scores += [s.text.strip() for s in score]
|
15
15
|
tmp_nam += 1
|
16
16
|
length += 1
|
17
17
|
```
|