【发布时间】:2019-05-14 23:55:36
【问题描述】:
我正在尝试从上述网络获取具有“名称表参与者”的 td 类的数量,但没有成功,因为我得到了 0。 有什么帮助吗?
谢谢
from requests import get
url = 'https://www.oddsportal.com/soccer/spain/laliga/'
response = get(url)
from bs4 import BeautifulSoup
html_soup = BeautifulSoup(response.text, 'html.parser')
type(html_soup)
movie_containers = html_soup.find_all('td', class_ = 'name table-participant')
print(type(movie_containers))
print(len(movie_containers))
【问题讨论】:
标签: python class html-table beautifulsoup