Python Forum
Twitter extracts on analytics tab - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Twitter extracts on analytics tab (/thread-10538.html)



Twitter extracts on analytics tab - parthi1705 - May-24-2018

Twitter download data
Is there a way to download one month data using python

https://analytics.twitter.com/user/username/tweets

say i am interested in April month data and in the calendar i have chosen Apr1 to Apr 30 and next step is to click export tab. it will have around 40 columns starting from Tweet id to promoted media engagements(40th column)

If we are using twitter API i am having below registered

access_token_key,access_token_secret,consumer_key,consumer_secret

with twitter API i am able to get last 200 tweets , but how can we take the analytics record.
import tweepy
import twitter
access_token_key=
access_token_secret=
consumer_key= 
consumer_secret=
def get_tweets(username):
        auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
        auth.set_access_token(access_token_key, access_token_secret)
  api = tweepy.API(auth)
         number_of_tweets=200
        tweets = api.user_timeline(screen_name=username)
        tmp=[] 
       rer= [tweet.text for tweet in tweets]
 for j in rer:
             tmp.append(j)
print(tmp)
if __name__ == '__main__':
    get_tweets("username")


can this be done in Python with any script option or by any means. this is for automation.

there are so many columns are there in excel report.

Tweet id Tweet permalink Tweet text time impressions engagements engagement rate retweets..........
promoted follows promoted email tweet promoted dial phone promoted media views promoted media engagements

Thanks for your help!.


RE: Twitter extracts on analytics tab - parthi1705 - May-24-2018

Thanks Larz. I will follow from future post :)
Do you have any idea on the above


RE: Twitter extracts on analytics tab - Larz60+ - May-24-2018

I'm not familiar with tweepy, so not sure what's needed to get what you want.


RE: Twitter extracts on analytics tab - parthi1705 - May-28-2018

Steps is : 1. Login to twitter with your userid and password 2.click on user profile we can see analytics tab 3. click on analytics tab it will pop up to new window [https://analytics.twitter.com/user/username/tweets].
If you have gone to the site "https://analytics.twitter.com/user/username/tweets" ,you will see the date range specified in it and we need to download after specifying the date.

There are N number of columns are there like Tweet id, Tweet permalink, Tweet text, time impressions, engagements, engagement rate, retweets,..........promoted follows, promoted email, tweet promoted, dial phone, promoted media, views promoted, media engagements.