Open steeley opened 2 years ago
I have the exact same problem.
I did not look at the Twitter source code yet, but it may be that they have constructed their tables differently now.
The error clearly occurs when BeautifulSoup
is trying to read a HTML table:
C:\ProgramData\Anaconda3\lib\site-packages\twitterscraper\query.py in get_proxies()
47 soup = BeautifulSoup(response.text, 'lxml')
48 table = soup.find('table',id='proxylisttable')
---> 49 list_tr = table.find_all('tr')
50 list_td = [elem.find_all('td') for elem in list_tr]
51 list_td = list(filter(None, list_td))
AttributeError: 'NoneType' object has no attribute 'find_all'
I fixed it with changing 48th line to: table = soup.find('table',{'class': 'table table-striped table-bordered'})
I fixed it with changing 48th line to: table = soup.find('table',{'class': 'table table-striped table-bordered'})
Hi there, I tried this and I am still getting the same error as above. Are there any other working solutions for this issue?
I fixed it with changing 48th line to: table = soup.find('table',{'class': 'table table-striped table-bordered'})
Hi there, I tried this and I am still getting the same error as above. Are there any other working solutions for this issue?
Hi, it's the same for me, too did you find a fix?
same for me. can anyone suggest a fix?
Same for me, I get this error when i just try to import the twitterscraper module into python
I fixed it with changing 48th line to: table = soup.find('table',{'class': 'table table-striped table-bordered'})
Maybe submit an MR to fix this?
!pip install twitterscraper==0.2.7 bunu yükledikten sonra bende find_all hatası düzeldi ama bu kezde Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11 Traceback (most recent call last): File "C:\Users\Samsung\anaconda3\lib\site-packages\fake_useragent\utils.py", line 154, in load for item in get_browsers(verify_ssl=verify_ssl): File "C:\Users\Samsung\anaconda3\lib\site-packages\fake_useragent\utils.py", line 99, in get_browsers html = html.split('
Python 3.9.7 osx Big sur.
twitterscraper Trump --limit 1000 --output=tweets.json
Traceback (most recent call last): File "/usr/local/bin/twitterscraper", line 33, in
sys.exit(load_entry_point('twitterscraper==1.6.1', 'console_scripts', 'twitterscraper')())
File "/usr/local/bin/twitterscraper", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 664, in _load_unlocked
File "", line 627, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/local/lib/python3.9/site-packages/twitterscraper-1.6.1-py3.9.egg/twitterscraper/init.py", line 13, in
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 664, in _load_unlocked
File "", line 627, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/local/lib/python3.9/site-packages/twitterscraper-1.6.1-py3.9.egg/twitterscraper/query.py", line 76, in
File "/usr/local/lib/python3.9/site-packages/twitterscraper-1.6.1-py3.9.egg/twitterscraper/query.py", line 49, in get_proxies
AttributeError: 'NoneType' object has no attribute 'find_all'