lamthuyvo / social-media-data-scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"wikipedia_scraper_sample.py": 'NoneType' object has no attribute 'find_all'

reikairen opened this issue · comments

Traceback (most recent call last):
  File "C:/Users/mrsidespin1/Desktop/lamthuyvo/wikipedia_scraper_sample.py", line 47, in <module>
    scrapeContent(url)
  File "C:/Users/mrsidespin1/Desktop/wikipedia_scraper_sample.py", line 26, in scrapeContent
    all_groupings = content.find_all('div', class_='mw-category-group')
AttributeError: 'NoneType' object has no attribute 'find_all'

Line 26, change "all_groupings = content.find_all('div', class_='mw-category-group')" to "all_groupings = soup.find_all('div', class_='mw-category-group')"