Python Forum
Twitter extracts on analytics tab
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Twitter extracts on analytics tab
#1
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!.
Reply
#2
Thanks Larz. I will follow from future post :)
Do you have any idea on the above
Reply
#3
I'm not familiar with tweepy, so not sure what's needed to get what you want.
Reply
#4
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  (Python) Pulling data from UA Google Analytics with more than 100k rows into csv. Stockers 0 1,217 Dec-19-2022, 11:11 PM
Last Post: Stockers
  How do I scrape profile information from Twitter People search results? asdad 0 729 Nov-29-2022, 10:25 AM
Last Post: asdad
  Is it possible to write a python script to block twitter feeds? cubangt 0 867 Apr-07-2022, 04:14 PM
Last Post: cubangt
  Reducing JSON character count in Python for a Twitter Bot johnmitchell85 2 51,494 Apr-28-2021, 06:08 PM
Last Post: johnmitchell85
  Twitter follower network gugatcgwgf 2 2,054 May-06-2020, 10:29 AM
Last Post: gugatcgwgf
  Callback URL for twitter app Truman 5 5,392 Dec-10-2018, 10:45 PM
Last Post: nilamo
  Twitter listen script, dynamic search value? quitte74 0 1,878 Nov-01-2018, 01:09 PM
Last Post: quitte74
  Python & Azure Log Analytics SitoRBJ 0 3,251 Jun-12-2018, 01:38 PM
Last Post: SitoRBJ
  Why is basic Twitter Connectivity So Difficult? Not sure what I'm doing wrong. Oliver 0 1,882 Mar-10-2018, 12:38 PM
Last Post: Oliver
  Store twitter DM's in a .txt file buflek 5 5,184 Nov-16-2017, 04:41 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020