# ENG

## ⚙️ Installation

Requirement&#x73;**:**

* Python version 3.11.6 not higher than 3.12

Downloadin&#x67;**:**

1 | Clone a repository

```
git clone https://github.com/0xStarLabs/StarLabs-Twitter.git
```

```
cd StarLabs-Twitter
```

2 | Create a virtual environment

```
python -m venv venv
```

```
venv\Scripts\activate
```

3 | Install dependencies

```
pip install -r requirements.txt
```

4 | Start (after customization)

```
python main.py
```

## 📁 Preparation (data folder) <a href="#podgotovka-papka-data" id="podgotovka-papka-data"></a>

Here you can find all user data necessary for work.\\

\
**accounts.xlsx** - table with accounts, proxies and data for accounts.&#x20;<mark style="color:yellow;">Each row = 1 account.</mark> Cells are signed, intuitive. *Only AUTH\_TOKEN and PROXY fields need to be filled in.*\
\ <mark style="color:yellow;">**Proxies in the format USER:PASS\@IP:PORT**</mark>\ <mark style="color:yellow;">**ONLY HTTP proxies are supported.**</mark>\
\
\&#xNAN;*After running any function in the bot, the script itself will update the account status and username in the table.*\
\
**images** - a folder that contains images for functions that use images (tweet with a picture, etc.). **Images in .PNG and .JPG format are supported.**\
\
**comment\_text.txt** - a text file that stores comments for the Comment and Comment with picture functions. <mark style="color:yellow;">**The bot uses each comment line by line, i.e. 1 line = 1 comment.**</mark>\
You can customize the use of comments in the <mark style="color:yellow;">config.yaml</mark> file.\
\
**tweet\_text.txt** - a text file that stores tweets for Tweet, Quote and Tweet with picture functions. <mark style="color:yellow;">**The bot uses each tweet line by line, i.e. 1 line = 1 tweet.**</mark>\
You can customize the use of tweets in the <mark style="color:yellow;">config.yaml</mark> file.

## 📝 Config.yaml <a href="#config.yaml" id="config.yaml"></a>

This section will write in detail about each function in the <mark style="color:yellow;">**config.yaml**</mark> file.

{% code overflow="wrap" %}

```excel-formula
SETTINGS

THREADS: 1 - number of threads/simultaneous accounts the bot will do.

ATTEMPTS: 5 - in case of errors, how many times the bot will try to perform the action.

ACCOUNTS_RANGE: [0, 0] - the range of accounts to run. 
Example: [3, 6] means the bot will execute accounts starting from the third to the sixth.

EXACT_ACCOUNTS_TO_USE: [] - !Works only if ACCOUNTS_RANGE: [0, 0].
Example: [1, 3, 7] which means the bot will only execute accounts 1 3 and 7.

SHUFFLE_ACCOUNTS: false - shuffle accounts before each run or not.
If true, the bot will execute the accounts in random order each time.

PAUSE_BETWEEN_ATTEMPTS: [0, 0] - pause in seconds between attempts to perform a single action.
Example: [3, 10] - the pause will be between 3 and 10 seconds random.

RANDOM_PAUSE_BETWEEN_ACCOUNTS: [0, 0] - pause in seconds between accounts.
Example: [3, 10] - the pause will be 3 to 10 seconds random.

RANDOM_PAUSE_BETWEEN_ACTIONS: [0, 0] - pause in seconds between tasks.
Example: [3, 10] - the pause will be 3 to 10 seconds random.

RANDOM_INITIALIZATION_PAUSE: [0, 0] - pause in seconds before each account starts.
For example, you have 10 threads, and the pause is [5, 60]
So each account will count from 5 seconds to a minute before starting.
This is used so that all accounts don't start at the same time.

SEND_TELEGRAM_LOGS: false - whether to send logs about functions to telegram or not. true/false.

SEND_ONLY_SUMMARY: false - if true, the bot will send to Telegram only a general report for all accounts. 
```

{% endcode %}

{% code overflow="wrap" %}

```excel-formula
FLOW

SKIP_FAILED_TASKS: false - whether to skip uncompleted tasks or not.
If false, then the bot will stop working if it failed to complete some task.
If true, then the bot will skip the task and start doing the next one.
```

{% endcode %}

{% code overflow="wrap" %}

```excel-formula
TWEETS

RANDOM_TEXT_FOR_TWEETS: false - if true, the bot will take tweets from the data/tweet_text.txt file in random order. If false, then 1 line = 1 account. 
IMPORTANT: If you set false, make sure that the number of tweets in the file is greater than or equal to the number of accounts.

RANDOM_PICTURE_FOR_TWEETS: false - if true, the bot will take images from the data/images folder in random order. If false, then 1 image = 1 account. 
IMPORTANT: If you set false, make sure that the number of images in the file is greater than or equal to the number of accounts.
```

{% endcode %}

{% code overflow="wrap" fullWidth="false" %}

```excel-formula
COMMENTS

RANDOM_TEXT_FOR_COMMENTS: false - if true, the bot will take comments from data/comment_text.txt file in random order. If false, then 1 line = 1 account. 
IMPORTANT: If you set false, make sure that the number of comments in the file is greater than or equal to the number of accounts.

RANDOM_PICTURE_FOR_COMMENTS: false - if true, the bot will take images from the data/images folder in random order. If false, then 1 image = 1 account. 
IMPORTANT: If you set false, make sure that the number of images in the file is greater than or equal to the number of accounts.
```

{% endcode %}

{% code overflow="wrap" %}

```excel-formula
OTHERS

SSL_VERIFICATION: false - whether to do SSL verification or not.
If you see errors related to SSL in the console, try to set true.
```

{% endcode %}

The config can be customized either through a text document in the <mark style="color:yellow;">**config.yaml**</mark> file or through the web interface (*example in the screenshot below*).

In case the web config from the menu doesn't work for some reason, you can always edit it manually in the config.yaml file. You can also contact us in chat <mark style="color:yellow;">**<https://t.me/StarLabsChat>**</mark> for help.

To start the web interface you need to run the bot with the command python main.py and select the menu item <mark style="color:yellow;">**\[2] Edit config**</mark>.\
After that the bot will launch the config at URL <mark style="color:yellow;">**<http://127.0.0.1:3456>**</mark>, which you can open in any browser on your PC and customize the config from there. *By default, the bot itself opens a web browser with the desired URL.*\
\&#xNAN;***This config and website is launched and runs locally on your PC.***

After customizing the functions in the config, click the Save Configuration button in the top right corner of the page.

To exit the config, go back to the console and press <mark style="color:yellow;">CTRL + C</mark> several times, or just close the console.

<figure><img src="/files/igd8TroRN8x0DAEhfuTA" alt=""><figcaption><p>Config example</p></figcaption></figure>

***

## ▶️ Usage <a href="#usage" id="usage"></a>

1. Insert accounts and proxies into <mark style="color:yellow;">**data/accounts.xlsx**</mark>, save the file.
2. Open <mark style="color:yellow;">**config.yaml**</mark> and customize the config (*optional*)
3. Start the bot with the command <mark style="color:yellow;">**python main.py**</mark> and select <mark style="color:yellow;">**Start farming**</mark>.
4. Select the desired function from the list.
5. <mark style="color:yellow;">**After selecting the function, the bot will ask you for the necessary data to work, be it usernames for subscriptions, links for comments, etc.**</mark>

*After each run, the bot will save reports to the logs folder, a table will be created for each function, with the name of the function, date and time. Inside there will be statistics for each account, whether it performed the function or not.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://star-labs.gitbook.io/star-labs/twitter/eng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
