回答編集履歴

1

Update

2022/03/23 05:33

投稿

melian
melian

スコア21118

test CHANGED
@@ -4,6 +4,6 @@
4
4
 
5
5
  html = driver.page_source.encode('utf-8')
6
6
  soup = BeautifulSoup(html, 'html.parser')
7
- for elem_h3 in soup.select('a:has(> h3)'):
7
+ for elem_a in soup.select('a:has(> h3)'):
8
- print(elem_a.get_attribute('href'))
8
+ print(elem_a['href'])
9
9
  ```