Open wongpenghong opened 4 years ago
Please post your full traceback and command.
I have this issue too. traceback:
INFO: {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; x64; fr; rv:1.9.2.13) Gecko/20101203 Firebird/3.6.13'}
Traceback (most recent call last):
File "/share/python_scripts/twitterbotsearch.py", line 1, in <module>
from twitterscraper import query_tweets
File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/__init__.py", line 13, in <module>
from twitterscraper.query import query_tweets
File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/query.py", line 73, in <module>
proxies = get_proxies()
File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/query.py", line 46, in get_proxies
list_tr = table.find_all('tr')
AttributeError: 'NoneType' object has no attribute 'find_all'
I have this issue too. traceback:
INFO: {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; x64; fr; rv:1.9.2.13) Gecko/20101203 Firebird/3.6.13'} Traceback (most recent call last): File "/share/python_scripts/twitterbotsearch.py", line 1, in <module> from twitterscraper import query_tweets File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/__init__.py", line 13, in <module> from twitterscraper.query import query_tweets File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/query.py", line 73, in <module> proxies = get_proxies() File "/home/pi/.local/lib/python3.6/site-packages/twitterscraper/query.py", line 46, in get_proxies list_tr = table.find_all('tr') AttributeError: 'NoneType' object has no attribute 'find_all'
It is very likely to be caused by the empty list scraped from the proxy website.when the problem occurs, table should be empty. In this case, find_all method is not able to get anything from table. you could wait for a moment and retry it. It should be back to normal very soon.
What command are you running to get this traceback?
What command are you running to get this traceback?
torsocks twitterscraper Trump -l 1000
In query.py need change table = soup.find('table',id='proxylisttable')
to table = soup.find('table', {"class": 'table'})
because they change proxy site
Hi! I've changed the query.py as mentioned above, but I still don't succeed on solving the error. Any thoughts? My query was just running the example script:
examples/get_twitter_user_data.py
when i run on version
twitterscraper==1.4.0
, popup some error