Reputation: 1030
After scraping website I once applied the function find_all But cannot apply once more
why?
>>> from requests import get
>>> with get(url) as conn:
print(conn)
>>> soap = BeautifulSoup(conn.content,"lxml")
>>> MAIN_DATA = soap.find_all("div",{"class" :"SOMETHING"})
>>> MAIN_DATA.find(SOMETHING) # WHY I CANNOT APPLY find and findall Function to this object
THANKS
Upvotes: 1
Views: 58
Reputation: 311
I think you need to loop on your find_all:
for div in soap.find_all("div")
Upvotes: 1