So I'm starting to learn how to webscrape with BeautifulSoup, and I came across a doubt which I can't seem to overcome. I'm trying to save each article id and print it however my program always returns nothing. This is part of the html im using, I want to obtain the value inside data-ad-id
for art in soup.find_all('article'): values = [regist.text for regist in art.find_all('data-ad-id')] data.append(values) print(values)
How can I proceed on this one? Thank you
https://stackoverflow.com/questions/67040949/webscraping-w-beautifulsoup-return-class-value April 11, 2021 at 10:31AM
没有评论:
发表评论