Git Product home page Git Product logo

Comments (8)

bisguzar avatar bisguzar commented on September 18, 2024

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.

specu avatar specu commented on September 18, 2024

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.

specu avatar specu commented on September 18, 2024
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.

specu avatar specu commented on September 18, 2024

actually pip freeze reports:
twitter-scraper==0.3.0

from twitter-scraper.

specu avatar specu commented on September 18, 2024

It started to work fine again couple of days ago. I can't reproduce it anymore

from twitter-scraper.

bisguzar avatar bisguzar commented on September 18, 2024

I'll test project on different python versions ASAP, I'm happy that the problem solved ^^

from twitter-scraper.

specu avatar specu commented on September 18, 2024

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.

specu avatar specu commented on September 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.