Skip to content

A Python script to stream live tweets related to a Hashtag and save it to an S3 bucket

Notifications You must be signed in to change notification settings

varunu28/Twitter-HashTag-Streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter-HashTag-Streamer

A Python script to stream live tweets related to a list of Hashtags and save it to an S3 bucket as a JSON file

Demo

To-do

  • Get Twitter API key
  • Create streaming application to stream live tweets
  • Create S3 config using boto framework
  • Save every new tweet as a JSON to the S3 bucket
  • Add multithreading for large streamings

How to run the script?

  • Install the required libraries by running pip install -r requirements.txt in a virtual environment.
  • Create a Twitter application on the Twitter developer portal
  • Generate the token and and key for the application
  • Create a file credentials.py and fill the key and tokens in below template
    ACCESS_TOKEN = ""
    ACCESS_TOKEN_SECRET = ""
    CONSUMER_KEY = ""
    CONSUMER_SECRET = ""
    
  • Make sure to have s3 permissions for the aws user which has been configured on your system
  • Update the hashtags and bucket name in config.yaml
  • Run the script

About

A Python script to stream live tweets related to a Hashtag and save it to an S3 bucket

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages