twython

twython get_followers_list can only get 200 followers

懵懂的女人 提交于 2021-02-08 07:21:46
问题 Using Twython 3.1.0 trying to get followers of another user. followers = twitter.get_followers_list(screen_name=user, count=500) Even though user has 413 followers, I can only retrieve 200 of them. Then I tried using Twyton's cursor function: followers = twitter.get_followers_list(screen_name=user, count=500, cursor=10) It returns zero users: len(followers(['users'])) = 0 On the bright side, I looked at How to get twitter followers using Twython? and I was able to get all followers id's with

twython get_followers_list can only get 200 followers

≡放荡痞女 提交于 2021-02-08 07:14:41
问题 Using Twython 3.1.0 trying to get followers of another user. followers = twitter.get_followers_list(screen_name=user, count=500) Even though user has 413 followers, I can only retrieve 200 of them. Then I tried using Twyton's cursor function: followers = twitter.get_followers_list(screen_name=user, count=500, cursor=10) It returns zero users: len(followers(['users'])) = 0 On the bright side, I looked at How to get twitter followers using Twython? and I was able to get all followers id's with

twython get_followers_list can only get 200 followers

戏子无情 提交于 2021-02-08 07:13:07
问题 Using Twython 3.1.0 trying to get followers of another user. followers = twitter.get_followers_list(screen_name=user, count=500) Even though user has 413 followers, I can only retrieve 200 of them. Then I tried using Twyton's cursor function: followers = twitter.get_followers_list(screen_name=user, count=500, cursor=10) It returns zero users: len(followers(['users'])) = 0 On the bright side, I looked at How to get twitter followers using Twython? and I was able to get all followers id's with

twython get_followers_list can only get 200 followers

ⅰ亾dé卋堺 提交于 2021-02-08 07:09:16
问题 Using Twython 3.1.0 trying to get followers of another user. followers = twitter.get_followers_list(screen_name=user, count=500) Even though user has 413 followers, I can only retrieve 200 of them. Then I tried using Twyton's cursor function: followers = twitter.get_followers_list(screen_name=user, count=500, cursor=10) It returns zero users: len(followers(['users'])) = 0 On the bright side, I looked at How to get twitter followers using Twython? and I was able to get all followers id's with

Twython with 140 character limitation of twitter

折月煮酒 提交于 2021-01-28 05:43:19
问题 I am trying to search in twitter using Tython, but it seems that the library has a limitation on 140 characters. With the new feature of python, i.e. 280 characters length, what can one do? 回答1: This is not a limitation of Twython. The Twitter API by default returns the old 140-character limited tweet. In order to see the newer extended tweet you just need to supply this parameter to your search query: tweet_mode=extended Then, you will find the 280-character extended tweet in the full_text

Is it possible to stop twython streaming at certain point of time?

末鹿安然 提交于 2020-01-07 09:19:08
问题 I have the codes for twython streaming and it is working. def read_cred(file): in_handle = open(file,'r') cred = {} for ln in in_handle: data = ln.strip('\r\n').split('=') if len(data) > 1: key = data[0].strip(' ').lower() value = data[1].strip(' ') cred[key] = value else: print "error in parsing credentials file" return cred cred = read_cred(sys.argv[1]) class MyStreamer(TwythonStreamer): def on_success(self, data): act(data) def on_error(self, status_code, data): print status_code, data

How to install python package in a specific directory

末鹿安然 提交于 2019-12-31 04:11:10
问题 I'm developing a twitter app on google appengine - for that I want to use the Twython library. I tried installing it using pip - but it either installs it in the main python dir, or doesn't import all dependencies. I can simply copy all the files of Twython to the appengine root dir, and also import manually all the dependency libraries, but that seems awfully wrong. How do I install a package in a specific folder including all it's dependencies? Thanks 回答1: If you put the module files in a

Twython search API with next_results

懵懂的女人 提交于 2019-12-28 14:08:11
问题 I'm a bit confused about the search API. Let's suppose I query for "foobar", the following code: from twython import Twython api = Twython(...) r = api.search(q="foobar") In this way I have 15 statuses and a "next_results" in r["metadata"] . Is there any way to bounce back those metadata to the Twython API and have the following status updates as well, or shall I get the next until_id by hand from the "next_results" and perform a brand new query? 回答1: petrux, "next_results" is returned with

Twython search API with next_results

久未见 提交于 2019-12-28 14:08:09
问题 I'm a bit confused about the search API. Let's suppose I query for "foobar", the following code: from twython import Twython api = Twython(...) r = api.search(q="foobar") In this way I have 15 statuses and a "next_results" in r["metadata"] . Is there any way to bounce back those metadata to the Twython API and have the following status updates as well, or shall I get the next until_id by hand from the "next_results" and perform a brand new query? 回答1: petrux, "next_results" is returned with

Twitter API: How to exclude retweets when searching tweets using Twython

…衆ロ難τιáo~ 提交于 2019-12-20 02:15:21
问题 I'm trying to exclude retweets and replies in my Twython search. Here is my code: from twython import Twython, TwythonError app_key = "xxxx" app_secret = "xxxx" oauth_token = "xxxx" oauth_token_secret = "xxxx" naughty_words = [" -RT"] good_words = ["search phrase", "another search phrase"] filter = " OR ".join(good_words) blacklist = " -".join(naughty_words) keywords = filter + blacklist twitter = Twython(app_key, app_secret, oauth_token, oauth_token_secret) search_results = twitter.search(q