Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Print debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
michelbl committed Oct 28, 2019
1 parent eedfd7f commit 7dd7e81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions twitter_fetch/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def get_advertisers():
adv['screenName']
for adv in response_advertisers.json()['users']
]
print(advertiser_screen_names)

response_lookup = api.request(
'GET',
Expand All @@ -144,6 +145,7 @@ def get_advertisers():
def get_advertiser_tweets(adv):
adv_screen_name = adv['screen_name']
adv_id = adv['id_str']
print(adv_screen_name)

response_advertiser_metadata = api.request(
'GET',
Expand Down Expand Up @@ -172,6 +174,7 @@ def get_advertiser_tweets(adv):
tweet['tweetId']
for tweet in tweets_basic_data
]
print(tweet_ids)
data_by_id = {
tweet['tweetId']: {
'basic_data': tweet
Expand All @@ -190,6 +193,7 @@ def get_advertiser_tweets(adv):
data_by_id[tweet_additional_data['id_str']]['additional_data'] = tweet_additional_data

for tweet_id in tweet_ids:
print(tweet_id)
if 'additional_data' in data_by_id[tweet_id]:

response_tweet_metadata = api.request(
Expand Down

0 comments on commit 7dd7e81

Please sign in to comment.