Skip to content

tomokazukozuma/Twitter-Crawler

Repository files navigation

Twitter-Crawler

Get tweets from followers of any account using Twitter's API. Please use it for account valuation analysis.

How to setup

  1. Install
git clone https://github.com/tomokazukozuma/Twitter-Crawler.git
  1. npm
cd Twitter-Crawler
npm install
npm install -g sequelize-cli
  1. 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
  1. 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
  1. Run
babel-node script/twitter/twitter_follower.js --screenName=`Any screen name`
babel-node script/twitter/twitter_follower_tweet.js

About

Crawling Twitter Follower Tweet Using Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published