6.1: Enable X/Twitter accounts
Enable X/Twitter accounts to start scraping
This guide will help you configure your Masa Node as a X/Twitter scraper using user/pass authentication.
An X/Twitter Pro Account is required
A paid X/Twitter Pro Account is absolutely necessary for scraping X/Twitter data. Ensure you have obtained a paid Twitter Pro Account before proceeding with the configuration.
Step 1
Set environment variable to enable X/Twitter scraping
Add the following lines to your .env
file to enable X/Twitter scraping:
Step 2
Enter Your X/Twitter Account login credentials in the .env
file
Add the following line to your .env
file, replacing username1:password1,username2:password2
with your actual X/Twitter account credentials:
Do not use Twitter accounts that you care about, since there is a small risk of them being suspended.
Step 3
Configure multiple user agents
Add the following line to your .env
file to specify multiple user agents. This helps the scraper mimic different browsers and increase login success rates.
Step 4
Restart your miner node
Stop the Masa node by pressing Ctrl + C
in the terminal where it is running, and then restart the miner node to apply the changes.
Run the miner node
To start the miner node, follow these steps:
- Open your terminal.
- Navigate to the directory where your miner node is located.
- Run the following command to start the miner node:
The miner node will start and begin processing. You should see logs indicating that the node is running and processing data.
Step 5
Verify that the X/Twitter scraper is enabled
Check the logs after running the miner node to verify that the X/Twitter scraper is enabled.