-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0 tweets #296
Comments
Have also been facing this issue. Queries that were returning tweets yesterday are not returning tweets today. |
I'm also facing the Same issue! Yesterday it was parsing well, but today it returns 0 tweets |
same here 0 tweets |
1 similar comment
same here 0 tweets |
Seems Twitter has restricted the connection so that all requests return a page with |
+1. That's bad. |
hocam bende bir proje geliştirmiştim projemde ana kısım buna bağlı bu sorunu nasıl düzeltebiliriz |
I need help |
same here... anyone has a clue for whats going on? |
Not yet. I used it for school university project. What will I do during the presentation |
Indeed, this can be fixed by modifying the header dictionary in query.py from |
It works for me! |
Thanks
I am very thank you. its work. |
its work.. thanks |
hi guys, im a kind of noob and do not have a HEADER in my code... someone can tell how can i implement it? |
Thanks a lot my friend! This worked for me! You are a genius! |
@toscanopedro The header dictionary: HEADER = {'User-Agent': random.choice(HEADERS_LIST)} is not in your own code, instead it is a line inside the file query.py Just open the file as TXT, and change the lines, such as @rubengoeminne said. You could search the file in your PC, maybe it will be foun at the path: C:\ProgramData\Anaconda3\Lib\site-packages\twitterscraper |
THX MAN!!!! |
The modification no longer works for query_user_info. I changed the header dictionary in query.py and still got no information on my list of users. |
I faced the same issue. It seems to work now to retrieve the tweets. However I get this error when I want to have user info, using query_user_info : local variable 'user_info' referenced before assignment |
Yah it is not working for me. Changed that line in query.py and same issue occurs. |
Hi. I have implemented the modification suggested by pumpkinw and the algortihm made progress. It was not scraping anything before modification. But after modification it is scraping, but not everything. It seems it is scraping only some last hours. For example, when I issued:
I received tweets corresponding only to hours from 20 up to 23 of day 2020-05-31:
Out[12]: [4 rows x 21 columns] Somebody know what is going on? |
already changed the header from HEADER = {'User-Agent': random.choice(HEADERS_LIST)} to |
I don't like modifying module's files directly, so instead of that and based on @rubengoeminne's great answer, to fix this issue you just have to add these line of codes to the top of your python script: import twitterscraper
import random
HEADERS_LIST = [
'Mozilla/5.0 (Windows; U; Windows NT 6.1; x64; fr; rv:1.9.2.13) Gecko/20101203 Firebird/3.6.13',
'Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko',
'Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201',
'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16',
'Mozilla/5.0 (Windows NT 5.2; RW; rv:7.0a1) Gecko/20091211 SeaMonkey/9.23a1pre'
]
twitterscraper.query.HEADER = {'User-Agent': random.choice(HEADERS_LIST), 'X-Requested-With': 'XMLHttpRequest'} And do your stuff normally: from twitterscraper import query_tweets
query_tweets("github", 100) |
This solution seems not to work for me now. |
Yeah, unfortunately they close it down. |
guys are you sure that you replace the correct arquive? this is still working for me |
This is what it shows. |
Thanks man MOre than that above, would you please tell how to run javascript method in selenium. |
@Frickson please share your command and output |
hey i just run the code that u mention above...actually i also got 0 tweets...then i change the query.py header that u just told...at that time i got this error |
@jassena What is "this error"? Please share your code and the full error here http://gist.github.com/ |
Tried everything, still getting 0 |
@Toby-masuku are you using |
@lapp0 yes I'm using the origin master |
What is the keyword of your query? I am searching Trump and it works fine. But it fails as i search nCoV and Wuhancoronavirus. |
@zhicheng0501 key word climate change |
what is your exact command and what is your output? Please paste it. |
@Toby-masuku Last login: Fri Feb 28 18:20:18 on ttys000 |
@zhicheng0501 |
@chanhee-kang This is the command and result that i am doing of covid19: |
can you please share your code, Maybe I made a mistake |
@zhicheng0501 the pip version worked for you? It doesn't have the headers fix in it. How did you get it to work? |
@Toby-masuku looks like you got 38 results. What is the problem? |
@lapp0 thats's not me, I got 0 |
Hi lapp0, I run the get_twitter_user_data.py from master/origin and just changed the list of name. Here my code
|
What exactly does this header list do? HEADERS_LIST = [ |
Creat random header list for sending request to the server. It lets the server see requests coming from different client,avoiding being blocked by the server. |
Just did that, same error 😑
|
All twitter scrapers dont seem to work anymore. I tried to use selenium to simply scrap maximum tweets between two chosen dates for given quiries. Check my work on : Scweet. let me know if you need any clarification. |
That is bad |
Yeah .., but I will do my best to add more features to the resulted csv. Til now I could scrap all the important informations about tweets like username, handle, tweet text, emojis, number of likes ... . I'll try to extract more useful informations like images links... |
snscrape still works |
There was a bug in query.py taspinar/twitterscraper#296 that cause query_tweets() to fetch 0 tweets. The solution was in one of the answers in the threads
INFO: Retrying... (Attempts left: 1)
INFO: Scraping tweets from https://twitter.com/search?f=tweets&vertical=default&q=bitcoin&l=
INFO: Using proxy 181.211.38.62:47911
INFO: Got 0 tweets for bitcoin.
Parsing may be an issue.
Both twitterscraper (0.9.3) and (1.4.0) are failing.
The text was updated successfully, but these errors were encountered: