Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/piero24/twitch-stream-viewer

Program to add one or more viewers to the twitch live
https://github.com/piero24/twitch-stream-viewer

bot python python3 stream twitch twitchtv twitter-bot

Last synced: 17 days ago
JSON representation

Program to add one or more viewers to the twitch live

Awesome Lists containing this project

README

        

**Project Status:** Work in progress โš ๏ธ


**Percentage Completely:** 70% ๐Ÿ”‹






Twitch-Stream-Viewer



















Script to automatically start the browser when your favorite streamer is online


Explore the docs ยป




Report Bug
โ€ข
Request Feature

---





๐Ÿ“” Introduction ๐Ÿ“”




This short python script allows you to automatically start the browser (for the moment it is only available with firefox) to see your favorite streamer. In case you are a streamer you can use it to verify that everything is going correctly in your stream.













๐Ÿงฐ Prerequisites ๐Ÿงฐ




There are some prerequisites needed to be able to use this script.


1) Have Firefox installed as a browser



2) You have logged in with your browser account (if you don't have one you have to create it)



3) Be registered on the Twitch developer portal (have your twitch ID and your twitch KEY)



4) Downloaded the Selenium drivers for Firefox


โ‡ง



โš™๏ธ How to Start โš™๏ธ


1. Install what you need to make everything work

```sh
pip install requests
pip install selenium
```





2. Rename data_empty.py to data.py





3. Login to twitch with you credential (The code should work even without this step but it is highly recommended to do so as it may not work if twitch requests the verification code by mail at login)





4. In the data.py file, enter the path to the folder where the account profile used to log in to firefox is.



In my case (on mac) it looks like this:

```python
firefox_arg = "/Users/username/Library/Application Support/Firefox/Profiles/axglk2qpm.default-release"
```

Now enter the path of the selenium driver

```python
PATH_firefox = r"/Users/username/Documents/twitch-stream-viewer/geckodriver"
```


5. Complete the following fields with the required data

```python
# Google e-mail and Twitch e-mail
email = 'YOUR-TWITCH-MAIL'
# Twitch Username
usr = 'YOUR-TWITCH-USERNAME'
# Twitch Password
pswd = 'YOUR-TWITCH-PASSWORD'

# Twitch developer data
twitch_ID = 'YOUR-TWITCH-DEVELOPER-ID'
twitch_KEY = 'YOUR-TWITCH-DEVELOPER-KEY'

# Streamer name and link
streamer_name = 'STREAMER-NAME'
```






Now everything is ready. To start it in the terminal, go to the folder containing the script and write

```ssh
python3 main.py
```





Tips:
The bot sends messages as soon as it connects to greet the stream and at regular intervals during the stream to show that it is still there. If you want to change the phrases just change them in the data.py file.

If you want to remove the messages during the stream and have only those at the beginning, just set the following in the data.py file.

```python
mid_time_msg = 0
```

โ‡ง

---

> *

Copyrright (C) by Pietrobon Andrea
Released date: Nov-2022*