by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 17 15:44

    geduldig on master

    Fix TwitterPager to iterate int… (compare)

  • Sep 17 15:42
    smushis commented #145
  • Sep 17 15:35
    geduldig commented #145
  • Sep 17 15:34
    geduldig labeled #145
  • Sep 13 11:52
    smushis opened #145
  • Jul 24 03:51
    geduldig closed #144
  • Jul 22 12:39
    andypiper commented #144
  • Jul 21 15:11
    geduldig commented #144
  • Jul 21 15:02
    msohaibali commented #144
  • Jul 21 12:57
    geduldig labeled #144
  • Jul 21 12:56
    geduldig commented #144
  • Jul 21 11:16
    msohaibali opened #144
  • Jul 17 14:28
    geduldig labeled #118
  • Jul 17 14:28
    geduldig labeled #129
  • Jul 17 14:28
    geduldig labeled #108
  • Jul 17 14:24
    geduldig closed #142
  • Jul 17 14:24
    geduldig closed #143
  • Jul 17 14:24

    geduldig on master

    Make exception raising configur… Update constants.py Added medi… Merge branch 'drbig-feature/mor… and 4 more (compare)

  • Jul 15 13:21
    drbig edited #142
  • Jul 14 23:57
    geduldig labeled #143
geduldig
@geduldig
testing...
danielselvon
@danielselvon
hello are you here?
Hello, I would like to hook your script into my nlp parser
So when it streams on twitter it passes it on to my nlp parser, but I don't know where to hook it up
I'm new to programming, sorry if my question seems stupid
But if you could spare some time to tell me I would greatly appreciate it, thanks
danielselvon
@danielselvon
Also I'm trying to install the package and it's saying suo: command not found
Ops sorry my bad, just fixed it
My fault, anyways let me know about mg parser nlp
If you have time thanks
danielselvon
@danielselvon
File "/usr/local/lib/python2.7/dist-packages/TwitterAPI/TwitterAPI.py", line 9, in <module>
from requests.exceptions import ConnectionError, ReadTimeout, SSLError
ImportError: cannot import name ReadTimeout
computer@ubuntu:~$
Ok, never mind, fix it
lol
geduldig
@geduldig
This message was deleted
geduldig
@geduldig
@danielselvon I have a little time. If you have a specific question I'll try to answer it, but how to "hook your script into my nlp parser" is a bit too vague. Maybe starting with this example will help.
Pushkin Abbott
@gotibhai
Hi, firstly thanks a lot for this awesome library.
fraba
@fraba
Hi, thanks for the library. It seems that using TwitterRestPager() with 'friends/list' produces a never ending loop. r = TwitterRestPager(api, 'friends/list', {'user_id':'146974766', 'count':100}) for item in r.get_iterator(): if 'screen_name' in item: print item['screen_name'].encode('utf-8') elif 'message' in item and item['code'] == 88: print 'SUSPEND, RATE LIMIT EXCEEDED: %s\n' % item['message'] break
geduldig
@geduldig
@fraba Thank you reporting the issue. I'll post here when there is a fix.
geduldig
@geduldig
@fraba Version 2.3.6 supports paging with API endpoints that return cursor fields. You should no longer see never ending loops with TwitterRestPager.
johendry
@johendry
can i use this API for Twitter Ads?
geduldig
@geduldig
@johendry Twitter Ads is not supported. I don't have access to the endpoints. If you do, try adding them to TwitterAPI/constants.py
John Troony
@JohnTroony
Hi @geduldig , I've sent a PR. Check if it's a valid one.
oh, I've seen you've just merged it. Cool, TwitterAPI has saved me a ton of workload.
nemobis
@nemobis
I just entered to say THANK YOU, finally a Twitter client that I understand and I've been able to use in a moment.
I was trying to create a Twitter list and I failed with something like a dozen of other methods...
geduldig
@geduldig
@nemobis Much appreciated!
DeastinY
@DeastinY
Hi all,
Is anyone doing the backup for the Twitter Streams properly ?
They describe the procedure here : https://dev.twitter.com/streaming/overview/connecting
And if anyone already implemented it that way I'd gladly add it to the docs :)
geduldig
@geduldig
@DeastinY If you look at http://geduldig.github.io/TwitterAPI/faulttolerance.html there is a code template that will start you off for implementing the backoff strategy for streaming. You will see a few places with a comment saying "re-try request". These are the places to set a timer. The 90-second stall is already handled in TwitterAPI's streaming iterator.
Thongvan Alexis
@LoudMurmur
This message was deleted
Alexander
@teichopsia-

Hello folks. Beginner here. I have a question regarding the usage of the TwitterAPI; It's regarding user authentication.

From what I've been able to understand, the library supports User and App authentication - but it doesn't implement a way to get the tokens from the user. But that can be done using the requests and python-oauth2 libraries and we then somehow pass the returned values to TwitterApi. Well, that's my understanding anyhow.

geduldig
@geduldig
@teichopsia- You are right, TwitterAPI has no methods for getting tokens from a user. But, you can find a stripped-down example of how to use the requests library to accomplish this here.
Alexander
@teichopsia-
@geduldig Thanks. I was looking into flask-oauthlib and a few others, trying to wrap my head around the differences. It's a shame this chat is pretty much vacant. You have a great library for beginners. It has the right balance between getting stuff done and being small enough to learn from and make sense what's going on.
geduldig
@geduldig
@teichopsia- I'm glad you find the library useful. Yes, there's not much activity in this forum. I check it from time-to-time. If you want more responses to questions you will have better luck on stackoverflow.com. Or, you can submit a question as an issue on the TwitterAPI github site and I will always respond.
Alexander
@teichopsia-
@geduldig That's awfully kind. Take it easy.
Aminaba2016
@Aminaba2016
plz how can i export tweets from twitterapi to file ??
geduldig
@geduldig
@Aminaba2016 1) The TwitterAPI request will return a JSON object with all the tweet info 2) Either save the entire JSON object as text, or iterate through the JSON object and save the tweet info that you want. If you don't know how Python save data to a file, google that question. There are many examples. Good luck!
Nakul
@NakulKhare
My twitter stream API is not working, can anyone help me?
geduldig
@geduldig
@NakulKhare Possibly... what's your issue?
Nakul
@NakulKhare
@geduldig
According to twitter new documentation the twitter streaming API is closed and they introduced Account Activity API but I don't know how to use this.
geduldig
@geduldig
@NakulKhare Please share the link to the documentation stating that the Streaming API is closed.
geduldig
@geduldig
@NakulKhare Nothing in this link says the Streaming API is closed. What makes you think that it is "closed"? What is not working in your use of the Streaming API?
caimeng2
@caimeng2
Hi, Thank you for this wonderful package! I am very new to python, and love the idea of minimal wrapper. I just have one question. Is it possible to let the serach (something like premium_search.py) return full text of tweets instead of truncated ones? I googled it and found that I need to add tweet_mode=extended and let text = status["retweeted_status"]["full_text"]. Could you please kindly teach me where to add them when use this package?