Skip to content

Commit

Permalink
fixed twython dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
janezkranjc committed Apr 14, 2014
1 parent bf1c1f3 commit 3252eab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ oauthlib==0.6.1
requests==2.1.0
requests-oauthlib==0.4.0
supervisor==3.0
git+https://github.com/janezkranjc/twython.git
twython==3.1.2
4 changes: 2 additions & 2 deletions tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def save_tweets(statuses):
p = urlparse.urlparse(refresh_url)
new_since_id = dict(urlparse.parse_qsl(p.query))['since_id']
queries.update({'query':query,'geocode':geocode,'lang':lang},{"$set":{'since_id':new_since_id}},upsert=True)
logger.debug("Rate limit for current window: "+str(results['headers']['x-rate-limit-remaining']))
logger.debug("Rate limit for current window: "+str(twitter.get_lastfunction_header(header="x-rate-limit-remaining")))
save_tweets(results['statuses'])

next_results = results['search_metadata'].get('next_results')
Expand All @@ -155,7 +155,7 @@ def save_tweets(statuses):
next_results_max_id = dict(urlparse.parse_qsl(p.query))['max_id']
results = perform_query(q=query,geocode=geocode,lang=lang,count=100,since_id=since_id,max_id=next_results_max_id,result_type=result_type)
next_results = results['search_metadata'].get('next_results')
logger.debug("Rate limit for current window: "+str(results['headers']['x-rate-limit-remaining']))
logger.debug("Rate limit for current window: "+str(twitter.get_lastfunction_header(header="x-rate-limit-remaining")))
save_tweets(results['statuses'])

since_id = new_since_id

0 comments on commit 3252eab

Please sign in to comment.