Get tweets from followers of any account using Twitter's API. Please use it for account valuation analysis.
- Install
git clone https://github.com/tomokazukozuma/Twitter-Crawler.git
- npm
cd Twitter-Crawler
npm install
npm install -g sequelize-cli
- Setting Environment Variables
vi .env
CONSUMER_KEY=consumer-key
COMSUMER_SECRET=consumer-secret
ACCESS_TOKEN_KEY=access-token-key
ACCESS_TOKEN_SECRET=access-token-secret
- Setting Database for MySQL
Setting sequelize config
vi sequelize/config/config.json
{
"local": {
"username": "user",
"password": "password",
"database": "twitter_crawler",
"host": "127.0.0.1",
"dialect": "mysql",
"dialectOptions": {
"charset": "utf8mb4"
},
"logging": false
}
}
Create MySQL Database
mysql -u user -p
CREATE DATABASE twitter_crawler;
Execute Migaration
cd sequelize
sequelize db:migrate --env local
- Run
babel-node script/twitter/twitter_follower.js --screenName=`Any screen name`
babel-node script/twitter/twitter_follower_tweet.js