Skip to content

Latest commit

 

History

History
119 lines (81 loc) · 2.27 KB

INSTALLATION.md

File metadata and controls

119 lines (81 loc) · 2.27 KB

Installation

Node.js (>=14)

FFMPEG

twspace-crawler

  • Install twspace-crawler

    npm i -g twspace-crawler
    
  • Clone/Create .env file

    TWITTER_AUTHORIZATION=
    TWITTER_AUTH_TOKEN=
    
    • You need to set 1 of them for better Spaces look up

    • TWITTER_AUTHORIZATION

      1. Getting access to the Twitter API

      2. Navigate to Projects & Apps to create new app (or use existing app)

      3. Get app Bearer Token in Keys and tokens tab

      4. Set TWITTER_AUTHORIZATION value

        TWITTER_AUTHORIZATION=Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs...
        
    • TWITTER_AUTH_TOKEN

      1. Sign in Twitter

      2. Open new tab (Chrome)

        chrome://settings/cookies/detail?site=twitter.com&search=cookies
        
      3. Copy Content of auth_token

      4. Set TWITTER_AUTH_TOKEN value

        TWITTER_AUTH_TOKEN=456472d2...
        
  • Clone/Create config.yaml or config.json file

  • Start app

    twspace-crawler --env ./.env --config ./config.json --force-open
    

twspace-crawler with pm2

  • Install pm2

    npm i -g pm2
    
  • Clone/Create ecosystem.config.js file

    module.exports = {
      apps: [
        {
          name: 'twspace-crawler',
          script: 'twspace-crawler',
          args: '--env ./.env --config ./config.json --force-open',
          env: {
            NODE_ENV: 'production',
          },
        },
      ],
    }
    
  • Start app

    pm2 start ecosystem.config.js
    

https://pm2.keymetrics.io/docs/usage/startup/