Skip to content

ericaraujophd/trends_crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Collect TTs of Twitter in Brazil

This code aims to collect the trending topics of Twitter from time to time. The code is in the src folder below.

Previous settings

Twitter API

To set up the code, you first need to get credentials to use the Twitter API and generate a new file called twitter_config.txt from the template provided inside the settings folder.

Dropbox API

To syncronize the outputs, create a folder trends inside the main folder.

mkdir ./trends

Then, generate your credentials to use Dropbox as shown in the Developers website, and fill your token in the blank field of sync.py code. After changing the code, change the name of the file to sync_credentials.py

mv ./src/sync.py ./src/sync_credentials.py

Execution

To execute the code (Linux and OSx), you might set your crontab to call the script run.sh according to your schedule. For that we execute

crontab -e

The contab used for this work collects the trends every half an hour, as shown below

0,30 * * * * /path_to_folder/src/run.sh >> /path_to_folder/out.txt 2>&1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •