Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

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

Closed
dgnsrekt opened this issue Aug 29, 2020 · 2 comments
Closed

Comments

@dgnsrekt
Copy link

Profile class appears to be broken.

Ran the following code.

from twitter_scraper import Profile

profile = Profile("dgnsrekt")
print(profile.name)
print(profile.user_id)

Output:

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    profile = Profile("dgnsrekt")
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/twitter_scraper/modules/profile.py", line 41, in __init__
    self.__parse_profile(page)
  File "/opt/virtualenvs/python3/lib/python3.8/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
@dgnsrekt
Copy link
Author

Version: Python 3.8.2 (default, Feb 26 2020, 02:56:10)

https://repl.it/@dgnsrekt/twitter-scraper-169

@dgnsrekt
Copy link
Author

I missed issue #166.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant