bisguzar / twitter-scraper

Scrape the Twitter Frontend API without authentication.
MIT License
3.88k stars 601 forks source link

UnboundLocalError: local variable 'html' referenced before assignment #202

Open mominurr opened 9 months ago

mominurr commented 9 months ago

Code : from twitter_scraper import Profile profile = Profile("bugraisguzar") print(profile.to_dict())

give me this error:

Traceback (most recent call last): File "D:\Testing_all_project\twitter-scraper.py", line 2, in profile = Profile("bugraisguzar") File "D:\Testing_all_project\env\lib\site-packages\twitter_scraper\modules\profile.py", line 41, in init
self.parse_profile(page) File "D:\Testing_all_project\env\lib\site-packages\twitter_scraper\modules\profile.py", line 65, in parse_profile self.location = html.find(".ProfileHeaderCard-locationText")[0].text UnboundLocalError: local variable 'html' referenced before assignment