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

Got 0 tweets #344

Open
danmlf1 opened this issue Sep 10, 2020 · 30 comments
Open

Got 0 tweets #344

danmlf1 opened this issue Sep 10, 2020 · 30 comments

Comments

@danmlf1
Copy link

danmlf1 commented Sep 10, 2020

No description provided.

@miatang13
Copy link

I have the same issue. "twitterscraper Trump --limit 1000 --output=tweets.json" gives an empty json file.

@calebgrisell
Copy link

same issue :(

@kaushalvivek
Copy link

Same issue, getting 0 tweets.

@Aivi001
Copy link

Aivi001 commented Sep 14, 2020

Yes, I'm having the same problem, getting the following error message when "getting 0 tweets"

raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='twitter.com', port=443): Max retries exceeded with url: /search?f=tweets&vertical=default&q=%23Harami%20since%3A2020-08-22%20until%3A2020-08-24&l=en (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f5a3decb510>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

@GivenToFlyCoder
Copy link

I have the same issue, 0 tweets using query_tweets...

@jason1991220
Copy link

It doesn't work and return 0 tweet again. please help.

@christiangfv
Copy link

christiangfv commented Sep 18, 2020

ooh bad, doesn't work function query_tweets from_user() nor query_tweets(), since yesterday. please help.
maybe here is information https://blog.twitter.com/developer/en_us/topics/tips/2020/understanding-the-new-tweet-payload.html

@gautampal1947
Copy link

0 Tweets again. Please help.

@zhicheng0501
Copy link

ooh bad, doesn't work function query_tweets from_user() nor query_tweets(), since yesterday. please help.
maybe here is information https://blog.twitter.com/developer/en_us/topics/tips/2020/understanding-the-new-tweet-payload.html

The same error.
I agree with you.

@tpsvld
Copy link

tpsvld commented Sep 23, 2020

Easy Twitter enabled Javascript and shut down the backdor this code used
In detail:
Twitter has been developing since beginning of 2020 a new HTML Frontend with Randomly generated HTML Description Tags.
The scoll mechanism to load new tweets was already changed to work with javascript and unique session ID's in january 2020.
The URL "https://twitter.com/i/search/ with the &max_position=cursor" has been disabled in twitter.

It was surprising that with the russia collusion and other horse shit they didnt start to work to protect the data.

So as i said in April, the software is probably dead.

@tpsvld
Copy link

tpsvld commented Sep 23, 2020

ooh bad, doesn't work function query_tweets from_user() nor query_tweets(), since yesterday. please help.
maybe here is information https://blog.twitter.com/developer/en_us/topics/tips/2020/understanding-the-new-tweet-payload.html

This doesnt work with the Twitter API not even close.

They changed the HTML Page to avoid non conscented web scrapping.

@AveryData
Copy link

So is this library just donzo? It's over?

@zhicheng0501
Copy link

So is this library just donzo? It's over?

Temporarily. Yeah.
Hope it will be back soon

@pavstar619
Copy link

Thought I'd use this for my project. Guess that's not gonna happen anytime soon :(

@edmangog
Copy link

Same here. Trying the branch of selenium alternatively.

@sudz4
Copy link

sudz4 commented Oct 14, 2020

Is there another good similar library that people are using?

@adamzvx
Copy link

adamzvx commented Oct 22, 2020

same to me

@Simon-Smith-NKU
Copy link

same issue ,twitter disgust,

@qarampage
Copy link

Even I got 0 Tweets count. I posted a new tweet and still got Zero tweets. I spent a lot of time understanding the workflow and got 0 !

@sudz4
Copy link

sudz4 commented Nov 6, 2020

just use tweepy instead

import tweepy as tw
#Importing twitter access keys from a separate file in this project folder:
from credentials import * #Using keys as a variable

#Setting up Twitter API connection:
def twitter_creds():
"""
Connects to Twitter API.
For confidentiality purposes the access keys are in a separate file in the project folder.
Credential file is saved as credentials.py.

"""

#Authenticate credentials using keys:
auth = tw.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) #tells twitter I am valid user
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)

#Connect with API and authenticate:
api = tw.API(auth) #speaks to twitter
return api

#Finding some AI Tweets

search_words = "artificial+intelligence"
date_since = "2020-1-1"
#2020-3-12 outputted 669 tweets
#For fun let's see if we can get a little closer to 1000
#2020-3-12 gives me 673 tweets. 4 tweets in 3 months??? I don't know...
#2020-1-1 gets us to the limit set below of 1000
tweets = tw.Cursor(api.search,
q=search_words,
lang="en",
since=date_since).items(1000)

for tweet in tweets:
print(tweet.text)

@do-me
Copy link

do-me commented Nov 10, 2020

As twitterscraper is (temporarily) dead, I thought I'd share my favorite alternative scraper. @mattwsutherland your solution requires an API-key (which is super hard to get) so unfortunately it's useless to most people here.

Simply go for TweetScraper - for me its working perfectly.
Also see this medium article providing a useful pandas snippet to set up a nicely formatted dataframe.

Installation for Ubuntu is straightforward as described. For Windows just do the following:

git clone https://github.com/jonbakerfish/TweetScraper.git
conda create -n tweetscraper python=3.7.7 -y
conda activate tweetscraper
conda install -y -c conda-forge scrapy ipython ipdb
pip install scrapy-selenium

Change to directory "TweetScraper" and test with

scrapy crawl TweetScraper -a query="foo,#bar"

@qarampage
Copy link

qarampage commented Nov 11, 2020 via email

@lavarthan
Copy link

still, the issue is continuing, Anyone finds a solution or another work around?

@Guolin1996
Copy link

I think this scrapper is dead and may not be able untill somebody make changes.

@Altimis
Copy link

Altimis commented Jan 15, 2021

@Guolin1996 Yes unfortunately ...

@amitchandnia
Copy link

I have the same issue. "twitterscraper Trump --limit 1000 --output=tweets.json" gives an empty json file.

where to set Author API in this code?

@shawnngtq
Copy link

Commenting to watch, same issue here

@woaying
Copy link

woaying commented Jul 21, 2021

I guess it's still dead. Just tried, got 0 tweets.

@Hat52
Copy link

Hat52 commented Jun 14, 2023

Still 0 tweets

@raygorous
Copy link

sad. still 0 tweets. is this related to Elon Musk?

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