from bs4 import BeautifulSoup
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://ntry.com/#/stats/ladder/date.php?date=2014-01-04")
html = driver.page_source
soup = BeautifulSoup(html, "html.parser")
prodList = soup.find_all("td", {"class": "round_cell"})
print(prodList)
The result value at run time is [ ] Come out.
beautifulsoup selenium selenium-webdrive python3
BeHow can I solve the problem of not being able to read the data when I crawl the web with automatic soup?I think you followed the answer in . If you follow the code you posted, reading HTML will work well.
But if you look at the source code, there is no tag called td, and there is no element with a class called round_cell. Please state what you are looking for.
© 2024 OneMinuteCode. All rights reserved.