Skip to content
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

no results #90

Closed
bartengine27 opened this issue Feb 11, 2018 · 34 comments
Closed

no results #90

bartengine27 opened this issue Feb 11, 2018 · 34 comments

Comments

@bartengine27
Copy link

The following example does not return any tweet, expected?

twitterscraper Trump -l 100 -bd 2017-01-01 -ed 2017-06-01 -o tweets.json

INFO: Querying Trump since:2017-01-01 until:2017-01-09
INFO: Querying Trump since:2017-01-25 until:2017-02-02
INFO: Querying Trump since:2017-01-17 until:2017-01-25
INFO: Querying Trump since:2017-02-02 until:2017-02-10
INFO: Querying Trump since:2017-02-10 until:2017-02-18
INFO: Querying Trump since:2017-02-18 until:2017-02-26
INFO: Querying Trump since:2017-02-26 until:2017-03-06
INFO: Querying Trump since:2017-01-09 until:2017-01-17
INFO: Querying Trump since:2017-03-06 until:2017-03-14
INFO: Querying Trump since:2017-03-14 until:2017-03-22
INFO: Querying Trump since:2017-03-22 until:2017-03-30
INFO: Querying Trump since:2017-03-30 until:2017-04-07
INFO: Querying Trump since:2017-04-07 until:2017-04-15
INFO: Querying Trump since:2017-04-15 until:2017-04-23
INFO: Querying Trump since:2017-04-23 until:2017-05-01
INFO: Querying Trump since:2017-05-01 until:2017-05-09
INFO: Querying Trump since:2017-05-09 until:2017-05-17
INFO: Querying Trump since:2017-05-17 until:2017-05-25
INFO: Querying Trump since:2017-05-25 until:2017-06-01
INFO: Got 0 tweets for Trump%20since%3A2017-02-10%20until%3A2017-02-18.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-03-30%20until%3A2017-04-07.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-02-18%20until%3A2017-02-26.
INFO: Got 0 tweets for Trump%20since%3A2017-01-09%20until%3A2017-01-17.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-04-07%20until%3A2017-04-15.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-04-15%20until%3A2017-04-23.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-03-22%20until%3A2017-03-30.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-03-06%20until%3A2017-03-14.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-05-25%20until%3A2017-06-01.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-01-01%20until%3A2017-01-09.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-04-23%20until%3A2017-05-01.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-01-17%20until%3A2017-01-25.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-05-01%20until%3A2017-05-09.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-03-14%20until%3A2017-03-22.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-01-25%20until%3A2017-02-02.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-02-26%20until%3A2017-03-06.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-05-17%20until%3A2017-05-25.
INFO: Got 0 tweets for Trump%20since%3A2017-02-02%20until%3A2017-02-10.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for Trump%20since%3A2017-05-09%20until%3A2017-05-17.
INFO: Got 0 tweets (0 new).

@taspinar
Copy link
Owner

@bartengine27 I could not reproduce this? Is this still an issue?

@evgeny-ffm
Copy link

@taspinar

Having the same issue

Yesterday it worked without any problems, today the scraper does not show any results. I tested it on 2 Windows computers and one MacOS in two different networks, the output is basically the same:

twitterscraper trump -l 100 -d
INFO: Querying trump since:2017-01-24 until:2017-02-16
INFO: Querying trump since:2017-01-01 until:2017-01-24
INFO: Querying trump since:2017-02-16 until:2017-03-11
INFO: Querying trump since:2017-03-11 until:2017-04-03
INFO: Querying trump since:2017-04-03 until:2017-04-26
INFO: Querying trump since:2017-04-26 until:2017-05-19
INFO: Querying trump since:2017-05-19 until:2017-06-11
INFO: Querying trump since:2017-06-11 until:2017-07-04
INFO: Querying trump since:2017-07-04 until:2017-07-27
INFO: Querying trump since:2017-07-27 until:2017-08-19
INFO: Querying trump since:2017-08-19 until:2017-09-11
INFO: Querying trump since:2017-09-11 until:2017-10-04
INFO: Querying trump since:2017-10-04 until:2017-10-27
INFO: Querying trump since:2017-10-27 until:2017-11-19
INFO: Querying trump since:2017-11-19 until:2017-12-12
INFO: Querying trump since:2017-12-12 until:2018-01-04
INFO: Querying trump since:2018-01-04 until:2018-01-27
INFO: Querying trump since:2018-01-27 until:2018-02-19
INFO: Querying trump since:2018-02-19 until:2018-03-14
INFO: Querying trump since:2018-03-14 until:2018-04-15
INFO: Got 0 tweets for trump%20since%3A2017-06-11%20until%3A2017-07-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-08-19%20until%3A2017-09-11.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-04-03%20until%3A2017-04-26.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-01-24%20until%3A2017-02-16.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-07-04%20until%3A2017-07-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-11-19%20until%3A2017-12-12.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-12-12%20until%3A2018-01-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-01-01%20until%3A2017-01-24.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-09-11%20until%3A2017-10-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-07-27%20until%3A2017-08-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2018-01-27%20until%3A2018-02-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-02-16%20until%3A2017-03-11.
INFO: Got 0 tweets for trump%20since%3A2018-02-19%20until%3A2018-03-14.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-10-04%20until%3A2017-10-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-04-26%20until%3A2017-05-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-03-11%20until%3A2017-04-03.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2018-01-04%20until%3A2018-01-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-10-27%20until%3A2017-11-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-05-19%20until%3A2017-06-11.
INFO: Got 0 tweets (0 new).
INFO: Got 20 tweets for trump%20since%3A2018-03-14%20until%3A2018-04-15.
INFO: Got 20 tweets (20 new).
[results for the 20 tweets]

@taspinar
Copy link
Owner

I noticed the results are consistent (not sure if this is the case on every platform/OS) if you set the number of processes to 1, could you try to run the query with the command line argument -p 1 ?

@evgeny-ffm
Copy link

evgeny-ffm commented Apr 20, 2018

@taspinar
No results are shown at all when the number of processes is set to 1:

twitterscraper trump -l 1000 -p 1 -d
[]

If the number of processes is set to default, one of the processes (the last one) returns a small number of tweets, while others return 0:

twitterscraper trump -l 1000 -d

INFO: Got 0 tweets for trump%20since%3A2017-10-04%20until%3A2017-10-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-04-26%20until%3A2017-05-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-01-24%20until%3A2017-02-16.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-07-04%20until%3A2017-07-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-12-12%20until%3A2018-01-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-03-11%20until%3A2017-04-03.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2018-02-19%20until%3A2018-03-14.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-10-27%20until%3A2017-11-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-02-16%20until%3A2017-03-11.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-04-03%20until%3A2017-04-26.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-11-19%20until%3A2017-12-12.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-06-11%20until%3A2017-07-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-05-19%20until%3A2017-06-11.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-09-11%20until%3A2017-10-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2018-01-04%20until%3A2018-01-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2018-01-27%20until%3A2018-02-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-01-01%20until%3A2017-01-24.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-07-27%20until%3A2017-08-19.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-08-19%20until%3A2017-09-11.
INFO: Got 0 tweets (0 new).
INFO: Got 60 tweets for trump%20since%3A2018-03-14%20until%3A2018-04-21.
INFO: Got 60 tweets (60 new)

5 processes:

twitterscraper trump -l 1000 -p 5 -d

INFO: Got 0 tweets for trump%20since%3A2017-04-06%20until%3A2017-07-10.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-07-10%20until%3A2017-10-13.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for trump%20since%3A2017-01-01%20until%3A2017-04-06.
INFO: Got 0 tweets (0 new).
INFO: Got 218 tweets for trump%20since%3A2017-10-13%20until%3A2018-04-21.
INFO: Got 218 tweets (218 new).

2 processes

twitterscraper trump -p 2 -o trump2.json -l 1000

INFO: Got 0 tweets for trump%20since%3A2017-01-01%20until%3A2017-08-26.
INFO: Got 0 tweets (0 new).
INFO: Got 516 tweets for trump%20since%3A2017-08-26%20until%3A2018-04-21.
INFO: Got 516 tweets (516 new).

when repeated in a minute, the number of tweets is 511

@LesmesWeb
Copy link

Good morning, I´m having the same issues.

Im working with Ubuntu in 16.04 version and two days ago was perfectly working and today is not extracting any data.
I did the following search:

twitterscraper %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 --lang en -o Executive.json

INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2006-03-21 until:2006-10-29
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2006-10-29 until:2007-06-08
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2007-06-08 until:2008-01-16
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2008-01-16 until:2008-08-26
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2008-08-26 until:2009-04-05
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2009-04-05 until:2009-11-13
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2009-11-13 until:2010-06-24
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2010-06-24 until:2011-02-01
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2011-02-01 until:2011-09-11
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2012-04-21 until:2012-11-29
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2012-11-29 until:2013-07-09
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2013-07-09 until:2014-02-16
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2014-02-16 until:2014-09-27
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2015-12-15 until:2016-07-25
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2016-07-25 until:2017-03-04
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2017-03-04 until:2017-10-12
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2014-09-27 until:2015-05-07
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2015-05-07 until:2015-12-15
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2017-10-12 until:2018-05-23
INFO: Querying %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30 since:2011-09-11 until:2012-04-21
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2007-06-08%20until%3A2008-01-16.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2006-03-21%20until%3A2006-10-29.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2009-11-13%20until%3A2010-06-24.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2012-04-21%20until%3A2012-11-29.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2011-02-01%20until%3A2011-09-11.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2006-10-29%20until%3A2007-06-08.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2009-04-05%20until%3A2009-11-13.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2015-12-15%20until%3A2016-07-25.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2012-11-29%20until%3A2013-07-09.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2013-07-09%20until%3A2014-02-16.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2017-03-04%20until%3A2017-10-12.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2011-09-11%20until%3A2012-04-21.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2016-07-25%20until%3A2017-03-04.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2014-02-16%20until%3A2014-09-27.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2010-06-24%20until%3A2011-02-01.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2008-01-16%20until%3A2008-08-26.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2008-08-26%20until%3A2009-04-05.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2014-09-27%20until%3A2015-05-07.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2015-05-07%20until%3A2015-12-15.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %23Executiveprotection%20since%3A2018-01-01%20until%3A2018-04-30%20since%3A2017-10-12%20until%3A2018-05-23.

@pynner
Copy link

pynner commented May 23, 2018

Not working on official site either @taspinar

@mattcyu1
Copy link

Just ran into this problem, think it has something to do with different Twitter responses depending on user agent.

If I force the User Agent as:
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36
then, it appears it works.

@pynner
Copy link

pynner commented May 24, 2018

@mattcyu1 The forced user agent worked yesterday, however, today returned no results. I went back to the random user agent today and it's working great.

@taspinar
Copy link
Owner

taspinar commented May 25, 2018

I noticed that in some of the cases, BeautifulSoup does not find any <li> element with class js-stream-item (see line 46 of tweet.py) even though the soup contains the entire html page with plenty of these <li> elements.
This does seem to occur more if the number of parallel processes is higher.

I'm trying to implement an alternative approach with Regular Expressions. It looks like the result is more consist but the RegExp still needs some work.

@taspinar taspinar mentioned this issue May 25, 2018
@3ruce
Copy link

3ruce commented May 25, 2018

@mattcyu1 How do you change/force the User Agent when running the command?

@LesmesWeb
Copy link

Good morning @taspinar, continue without extracting anything and how do you force the User Agent?

@taspinar
Copy link
Owner

taspinar commented May 25, 2018

Change the HEADERS_LIST in query.py such that it only contains the elements you want.
In our case that means
HEADERS_LIST = [“Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36”]

@3ruce
Copy link

3ruce commented May 25, 2018

Changing HEADERS_LIST as you suggested still returns zero tweets...

@LesmesWeb
Copy link

It does not work and still returns zero tweets

@bengarvey
Copy link

Make sure to run python setup.py install after making the change

@3ruce
Copy link

3ruce commented May 27, 2018

ok, thank you, so that partially worked...

twitterscraper trump -bd 2018-05-23 -ed 2018-05-24 --output=tweets-01.json returned 675 tweets

Here's the new error message

INFO: Querying trump since:2018-05-23 until:2018-05-24
ERROR: An unknown error occurred! Returning tweets gathered so far.
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/twitterscraper/query.py", line 108, in query_tweets_once
    pos is None
  File "build/bdist.linux-x86_64/egg/twitterscraper/query.py", line 68, in query_single_page
    except json.decoder.JSONDecodeError as e:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
INFO: Got 675 tweets for trump%20since%3A2018-05-23%20until%3A2018-05-24.
INFO: Got 675 tweets (675 new).

@LesmesWeb
Copy link

it works, thanks

@LesmesWeb
Copy link

Good morning @taspinar , the extraction problem persists, there are day when it works. During May 4th I made an extraction that dropped 50.825 tweets. Today with all the changes I’ve made hasn’t extract any tweets, besides yesterday it was only extracted 7,000 tweets with the same query which was as follows:

twitterscraper %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31 -o 26991572.json

INFO: Got 0 tweets for %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31%20since%3A2009-11-20%20until%3A2010-07-01.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31%20since%3A2016-01-01%20until%3A2016-08-11.
INFO: Got 0 tweets (0 new).

try this other way:

twitterscraper %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31 -p 5 -o prueba001.json

INFO: Got 0 tweets for %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31%20since%3A2008-08-30%20until%3A2009-04-10.
INFO: Got 0 tweets (0 new).
INFO: Got 0 tweets for %40camachocastro%20since%3A2013-02-01%20until%3A2014-05-31%20since%3A2012-12-10%20until%3A2013-07-22.
INFO: Got 0 tweets (0 new).

@lapp0
Copy link
Collaborator

lapp0 commented Jun 13, 2018

@CamiloVeloz your query @camachocastro since:2013-02-01 until:2014-05-31 since:2008-08-30 until:2009-04-10 is contradicting itself with multiple since and until.

I specify dates, but I use the query_tweets_once method, which doesn't apply additional dateranges.

You need to set the begin date with -bd and end date with -ed rather than having them in the query.

taspinar added a commit that referenced this issue Jun 13, 2018
useragents will no longer be generated with the fake_useragent package.
At the moment seven of the most popular useragent strings are written hardcoded in query.py
In later stages this should be done via a separate module.

This fixes #118,
#115,
#90
@taspinar
Copy link
Owner

I believe that most of the 'not being able to get all tweets' issues are caused by the useragent provided by fake_useragent.
I have removed fake_useragent as an dependency all together. See PR #119

Once this PR is merged, the newest versions should no longer have these issues.

Can you guys have a look at the PR?

taspinar added a commit that referenced this issue Jun 20, 2018
* query.py : remove fake_useragent, move separate try / except

- useragents will no longer be generated with the fake_useragent package.
At the moment seven of the most popular useragent strings are written hardcoded in query.py
In later stages this should be done via a separate module.
-By removing the separate try / except for the JsonDecodeError, each process now also continues with retrying to get the data instead of exiting.

This fixes #118,
#115,
#90
@kbbdeveloper
Copy link

Hi there,

Using the latest version of Twitterscraper in python 3.7.3, I'm getting the same got 0 tweets issue:

INFO: Got 0 tweets for xxx%20since%3A2019-10-12%20until%3A2019-10-13.
INFO: Got 579 tweets (0 new).

In fact, it's generating different numbers of tweets each time I run it. Using the same query a few days ago, there was no problem. Any ideas? And thanks for providing this library!

@has-ctrl
Copy link

has-ctrl commented Nov 8, 2019

I have got a very similar problems as everything mentioned before. It appears as if tweets from today are appearing, but the tweets from further back cannot be collected (even though the visible links do show tweets). It also appears as if it works on some days or some networks and not on others. Any explanation for this?

INFO: queries: ['Trump since:2019-05-07 until:2019-05-08']
INFO: {'User-Agent': 'Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'}
INFO: Querying Trump since:2019-05-07 until:2019-05-08
INFO: Scraping tweets from https://twitter.com/search?f=tweets&vertical=default&q=Trump%20since%3A2019-05-07%20until%3A2019-05-08&l=
INFO: Using proxy 103.240.168.138:60780
...
INFO: Retrying... (Attempts left: 3)
INFO: Scraping tweets from https://twitter.com/search?f=tweets&vertical=default&q=Trump%20since%3A2019-05-07%20until%3A2019-05-08&l=
INFO: Using proxy 67.209.121.36:80
INFO: Retrying... (Attempts left: 2)
INFO: Scraping tweets from https://twitter.com/search?f=tweets&vertical=default&q=Trump%20since%3A2019-05-07%20until%3A2019-05-08&l=
INFO: Using proxy 190.196.15.43:3128
INFO: Retrying... (Attempts left: 1)
INFO: Scraping tweets from https://twitter.com/search?f=tweets&vertical=default&q=Trump%20since%3A2019-05-07%20until%3A2019-05-08&l=
INFO: Using proxy 46.101.176.49:8080
INFO: Got 0 tweets for Trump%20since%3A2019-05-07%20until%3A2019-05-08.
INFO: Got 0 tweets (0 new).

@cgebe
Copy link

cgebe commented Nov 25, 2019

Apparently, this issue is still present. After scraping for few hours, i face this problem. Anyone has a solution? Changing the User-Agent was only a temporary solution. Introducing new a User-Agent does also not help.

@NicholasDow
Copy link

I am still having this issue.

@hakanyusufoglu
Copy link

Me too.

@simahashemi
Copy link

I need it immediately and got the same thing. can anyone help me?

@MiguelMMota
Copy link

Same problem here

@dullmode
Copy link

dullmode commented Jun 7, 2020

how about this
https://github.com/PJHRobles/Twitter-Get-Old-Tweets-Scraper

you can easily get twitter information without api

@lapp0
Copy link
Collaborator

lapp0 commented Jun 7, 2020

Please try git clone git@github.com:taspinar/twitterscraper.git (pypi doesn't have the recent headers change fix yet)

Duplicate of #296 please move discussion there

@lapp0 lapp0 closed this as completed Jun 7, 2020
@chhinder1987
Copy link

INFO: queries: ['corona since:2020-05-07 until:2020-05-08']
INFO: Got 0 tweets (0 new)
the same problem plz help me

@grossmanm
Copy link

I'm also having this problem. Are there any solutions?

@chhinder1987
Copy link

chhinder1987 commented Jun 24, 2020 via email

@chhinder1987
Copy link

plz suggest another way to download historical tweets

@grossmanm
Copy link

This may work as an alternative https://pypi.org/project/GetOldTweets3/

meticulousfan added a commit to meticulousfan/scraping-site that referenced this issue Aug 19, 2022
* query.py : remove fake_useragent, move separate try / except

- useragents will no longer be generated with the fake_useragent package.
At the moment seven of the most popular useragent strings are written hardcoded in query.py
In later stages this should be done via a separate module.
-By removing the separate try / except for the JsonDecodeError, each process now also continues with retrying to get the data instead of exiting.

This fixes taspinar/twitterscraper#118,
taspinar/twitterscraper#115,
taspinar/twitterscraper#90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests