回答編集履歴

1

修正

2020/06/02 09:19

投稿

ForestSeo
ForestSeo

スコア2722

test CHANGED
@@ -1,9 +1,11 @@
1
1
  ```Python
2
2
 
3
- soup.find_all('div', attrs = {'class': 'Horse02'}).find_all('a', attrs = {'href': re.compile('^/horse')})
3
+ lst = []
4
4
 
5
-
5
+ for item in soup.find_all('div', attrs = {'class': 'Horse02'}):
6
6
 
7
- soup.find_all('div', attrs = {'class': 'Horse02'}).find('a', attrs = {'href': re.compile('^/horse')})
7
+ lst.append(item.find('a', attrs = {'href': re.compile('^/horse')}))
8
+
9
+ print(lst)
8
10
 
9
11
  ```でいけますか?