Comments (8)
I get tweets w/o any errors, is the problem still exists?
Python 3.7.3 (default, Mar 26 2019, 21:43:19)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from twitter_scraper import get_tweets
>>> for tweet in get_tweets('VuduFans', pages=1):
... print(tweet['text'].encode('ascii', 'ignore').decode())
...
Come on in, the waters fine. Swim up to some great horror movie deals and get up to $8 off a movie ticket to see #crawlmovie (in theaters 7/12). See full terms and shop the collection: http://ow.ly/iYn250uX1qjpic.twitter.com/NLLk5j7FzQ
Three of your favorites, one incredible price! Check out our 3 HDX for $5 "Mix & Match" sale and get your binge on: http://bit.ly/2JEgbkv pic.twitter.com/243dZOZiR1
Our friends at @moonpie want to see their snack in space That seems like a sweet idea to us! Retweet, tag a friend who should support, and comment #VuduMoonpies for a chance to win a t-shirt and moonpie: http://bit.ly/2O4eUrs pic.twitter.com/2snOxEKSN4
Happy first day of #ComicCon to all you c.....................................
from twitter-scraper.
yes, just ran it on raspberrypi Python 3.6.9
and anaconda on windows Python 3.7.3
exact same error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\twitter_scraper.py", line 78, in get_tweets
yield from gen_tweets(pages)
File "C:\ProgramData\Anaconda3\lib\site-packages\twitter_scraper.py", line 35, in gen_tweets
text = tweet.find('.tweet-text')[0].full_text
IndexError: list index out of range
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/twitter_scraper.py", line 78, in get_tweets
yield from gen_tweets(pages)
File "/usr/local/lib/python3.6/site-packages/twitter_scraper.py", line 35, in gen_tweets
text = tweet.find('.tweet-text')[0].full_text
IndexError: list index out of range
from twitter-scraper.
md5sum /usr/local/lib/python3.6/site-packages/twitter_scraper.py
88262a230b1b11ecfea7cb92a8695b71 /usr/local/lib/python3.6/site-packages/twitter_scraper.py
since there's no version indicator in the module...
from twitter-scraper.
actually pip freeze reports:
twitter-scraper==0.3.0
from twitter-scraper.
It started to work fine again couple of days ago. I can't reproduce it anymore
from twitter-scraper.
I'll test project on different python versions ASAP, I'm happy that the problem solved ^^
from twitter-scraper.
Its actually not related to a particular twitter, but to checking multiple twitters in the same script. Im getting the errors again for a different twitter acct now
from twitter-scraper.
@bisguzar
can you reproduce using this?
import traceback
from twitter_scraper import get_tweets
for twitter in [ "xbox", "Minecraft", "VuduFans", "minecraftearth" ]:
try:
for tweet in get_tweets(twitter, pages=1):
tweet_text = tweet['text'].encode('ascii', 'ignore').decode()
except Exception as e:
print( "error getting twitter '{}': {}\n{}".format(twitter, e,traceback.format_exc()) )
result:
error getting twitter 'minecraftearth': list index out of range
Traceback (most recent call last):
File "deleteme.py", line 6, in <module>
for tweet in get_tweets(twitter, pages=1):
File "/usr/local/lib/python3.6/site-packages/twitter_scraper.py", line 78, in get_tweets
yield from gen_tweets(pages)
File "/usr/local/lib/python3.6/site-packages/twitter_scraper.py", line 35, in gen_tweets
text = tweet.find('.tweet-text')[0].full_text
IndexError: list index out of range
from twitter-scraper.
Related Issues (20)
- f'Oops! Either "{query}" does not exist or is private.' HOT 3
- UnboundLocalError: local variable 'html' referenced before assignment HOT 4
- DeprecationWarning: invalid escape sequence \g
- Getting historical tweet volume data with specific hashtags
- Not get Profile Info HOT 3
- Feature: Get User Following/Friend (and Followers)
- Documentation: Addressing shadow-bans HOT 3
- Tweet Links and Media Files HOT 2
- Doesn't scrap anything. HOT 8
- Does this work? HOT 10
- get_tweets in your example is not working HOT 1
- Twitter scrapy
- I am getting this issue : UnboundLocalError HOT 3
- json.decoder.JSONDecodeError: in get_trends() HOT 5
- json.decoder.JSONDecodeError: in get_tweets() HOT 7
- UnboundLocalError: local variable 'html' referenced before assignment
- setup.py fails
- pip3 install fails
- Enable running on Apify cloud platform
- does anyone got an 403 error ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitter-scraper.