Giter VIP home page Giter VIP logo

Comments (3)

Dpananos avatar Dpananos commented on July 29, 2024 1

The script seems to be working as designed for pulling cards from twitter. However, I see when pulling tweets, only 286 are returned. This could be a limitation of the twitter API, I don't know.

What you could do is use the time library to get around the rate limitation (if that is the problem).

You could do something like

while (True):
    time.sleep(5*60) #sleep needs time in seconds. Sleep 5 minutes before truing again
    more_tweets = api.user_timeline(screen_name='chrisalbon',
                                count=200,
                                include_rts=False,
                                exclude_replies=True,
                                max_id=last_id-1)
                                    
    # There are no more tweets
    if (len(more_tweets) == 0):
          break
    else:
        last_id = more_tweets[-1].id-1
        tweets += more_tweets
        

There may be another way to get more tweets, I'm not sure. Feel free to investigate and make a PR.

from getcards.

Dpananos avatar Dpananos commented on July 29, 2024 1

Good catch. I just tried pulling my own tweets, and the script works as expected. This has something to do with Chris' account. Maybe Chris deleted old tweets, maybe twitter is archiving them. Either way, this is out of my control, and so if there is nothing else to address, I am closing the issue.

from getcards.

hovikgas avatar hovikgas commented on July 29, 2024

When I go to his Twitter page and scroll down, it won't let me see Tweets from before February 21.
Screen Shot 2019-03-29 at 1 33 05 PM
Coincidentally, February 22 was the last card I downloaded: the IQR. So does Twitter archive old Tweets? I checked the Twitter API rate limits and I don't think we are crossing any of them, as they are listed here.

from getcards.

Related Issues (2)

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.