Update README.md

This commit is contained in:
muskit
2023-08-18 02:06:13 -07:00
parent 823cd5e74e
commit 404cb8a7ab
+35 -7
View File
@@ -5,6 +5,24 @@ Twitter bot that tracks cross-company interactions between the non-JP branches o
**This project was created to run [this account](https://twitter.com/NijiHolo_EN_ID).** **This project was created to run [this account](https://twitter.com/NijiHolo_EN_ID).**
## Running
Install dependencies.
```
pip install -r requirements.txt
```
Setup the `.env` in the project root. Refer to the `.env` section for variables.
Run the program from project root (not in `src`). Refer to the following section for options.
```
python src/main.py
```
## Modes & Options
The bot may run in these modes:
* Pass no argument to run in listen mode, which scrapes all accounts in the *list* folder at an interval.
* Pass `--straight-to-queue` to process the locally-stored queue first before attempting to scrape.
* Command-line (`cmd`): an interactive mode for manual control and debugging (drops into Python interpretor)
## `.env` ## `.env`
These need to be defined in a `.env` file at the project root (outside of `src`): These need to be defined in a `.env` file at the project root (outside of `src`):
@@ -21,7 +39,7 @@ scraper_password0=
scraper_username1= scraper_username1=
scraper_password1= scraper_password1=
``` ```
The first account (`scraper_username0` and `scraper_password0`) will be used to attempt scraping private accounts. Make sure this account follows any private accounts that you want to scrape! The first account (`scraper_username0` and `scraper_password0`) **MUST be defined (`scraper_username` and `scraper_password` without number will not work!)** and will be used to attempt scraping private accounts. Make sure this account follows any private accounts that you want to scrape!
### Twitter API Stuff ### Twitter API Stuff
The following keys/tokens are used for the official API via `tweepy`. We mainly use these to just post tweets. The following keys/tokens are used for the official API via `tweepy`. We mainly use these to just post tweets.
``` ```
@@ -35,11 +53,21 @@ This is the authentication token obtained from a browser when signed in on the T
``` ```
web_auth_token= web_auth_token=
``` ```
### Example contents of `.env` without values
## Running modes ```
The bot may run in these modes: scraper_username0=
* Pass no argument to run in listen mode, which scrapes all accounts in the *list* folder at an interval. scraper_password0=
* Pass `--straight-to-queue` to process the queue first before attempting to scrape. scraper_username1=
* Command-line (`cmd`): an interactive mode for manual control and debugging (drops into Python interpretor) scraper_password1=
scraper_username2=
scraper_password2=
scraper_username3=
scraper_password3=
web_auth_token=
app_key=
app_secret=
user_token=
user_secret=
```
*Created for the spirit of entertainment and in the name of unity.* *Created for the spirit of entertainment and in the name of unity.*