Python 3 Twint Library Example to Scrape Twitter API for Posts, Profile & Tweets of User in Command Line

Python 3 twint Library Example to Scrape Twitter API For Posts, Profile & Tweets of User in Command Line

import twint
 
c = twint.Config()
 
c.Search = ['Taylor Swift']       # topic
c.Limit = 500      # number of Tweets to scrape
c.Store_csv = True       # store tweets in a csv file
c.Output = "taylor_swift_tweets.csv"     # path to csv file
 
twint.run.Search(c)

Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment