-
Windows
-
Linux
https://linuxize.com/post/how-to-install-node-js-on-ubuntu-20-04/
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt install nodejs
-
Windows
https://www.geeksforgeeks.org/how-to-install-ffmpeg-on-windows/
-
Linux
https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-20-04/
sudo apt update sudo apt install ffmpeg
-
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
Using TWITTER_AUTHORIZATION
-
Navigate to Projects & Apps to create new app (or use existing app)
-
Get app
Bearer Token
inKeys and tokens
tab -
Set
TWITTER_AUTHORIZATION
valueTWITTER_AUTHORIZATION=Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs...
Using TWITTER_AUTH_TOKEN
& TWITTER_CSRF_TOKEN
(REQUIRED)
-
Sign in Twitter
-
Press F12 to open dev tools
-
Select
Application
tab -
Select
Storage
>Cookies
>https://twitter.com
-
Clone .env.example and rename to
.env
-
Copy
auth_token
and set toTWITTER_AUTH_TOKEN
-
Copy
ct0
and set toTWITTER_CSRF_TOKEN
TWITTER_AUTH_TOKEN=456472d2... TWITTER_CSRF_TOKEN=05f85936...
-
Clone/Create config.yaml or config.json file
-
Start app
twspace-crawler --env ./.env --config ./config.json --force-open
-
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