Find div without class (web scraping)
Question:
How to find a div without any class like in below example the div has a class
authordiv = soup.find('div', attrs={'class': 'list-authors'})
Answers:
If you want to find divs without class, try this:
soup.find('div', attrs={'class': None})
If your problem is to find any div (with or without class), just remove the second argument
Use None object as a class name:
soup.find('div', attrs={'class': None})
How to find a div without any class like in below example the div has a class
authordiv = soup.find('div', attrs={'class': 'list-authors'})
If you want to find divs without class, try this:
soup.find('div', attrs={'class': None})
If your problem is to find any div (with or without class), just remove the second argument
Use None object as a class name:
soup.find('div', attrs={'class': None})