Tracks twitter spaces and sends it to a discord webhook.

Overview

auto-twitter-space

Overview

A program that tracks twitter spaces and sends it to a discord webhook. It uses the twitter api to find twitter spaces and then the m3u8 url for the space is found using selenium and will have it printed on console and posted using a discord webhook. Optionally It can also download the twitter space after it ends.

Installation and Requirements

This program requires a few non-standard modules all of which can be installed using the requirements text file. A requirements text file has been included and the command pip3 install -r requirements.txt (or pip) can be used to install the required dependencies(except FFMPEG and ChromeDriver). ChromeDriver is also required to get the m3u8 url so make sure the chrome driver version matches your browser version. Also ensure chromedriver is in the same directory as this program.

How To Use

Since this program runs and obtains the Twitter Spaces through the twitter API, users must go to the twitter developer portal and sign up or login. Afterwards, create a project app and obtain the API Key and Secret, Bearer Token, and the Access Token. Put these information inside the const.py(if you haven't already renamed const.py.example to const.py, do so now)

With the Twitter authorization/authentication out of the way you can optionally obtain the discord webhook url and put it in const.py if you want Twitter Space notification to also be posted onto your discord channel.

Optionally you can also specify whether to download the Twitter Space and/or the download location. There are two download options one using the default twspace.py file provided which will only download Twitter Space from the Japan area and can post the downloaded file to discord within it's limits. The second download method is by using Ryu's downloader. Download is optional as it has not been thoroughly tested so use at your own risk(just double check if the file was downloaded and whether it is the full file)

With all the setting up out of the way the program can run by calling the main/index file twitter_space_bot.py

Note: Do not share these key and tokens!

Note 2: I was not the original creator of twspace.py, credits go to whoever made it on our group discord server! I had to make a lot of changes to suit my own needs though.

Note 3: The API limit for twitter spaces are 300 requests per a 15 minute window. The program makes 1 request per interval so adjust the SLEEP_TIME accordingly. If for some reason the m3u8 url can't seemingly be found increase the SLEEP_TIME.

Note 4: So far this has only been tested on Windows 10 and with the chrome driver.

Owner
Sam Phung
A data hoarder and archivist with an interest in Anime and Vtubers!
Sam Phung
Role Based Access Control for Slack-Bolt Applications

Role Based Access Control for Slack-Bolt Apps Role Based Access Control (RBAC) is a term applied to limiting the authorization for a specific operatio

Jeremy Schulman 7 Jan 06, 2022
Import Notion Tasks to

Notion-to-Google-Calendar (1 way) Import Notion Tasks to Google Calendar NO MORE UPDATES WILL BE MADE TO THIS REPO. Attention has been put on a 2-way

12 Aug 11, 2022
Python client and API for monitoring and controling energy diversion devices from MyEnergi

Python client and API for monitoring and controling energy diversion devices from MyEnergi A set of library functions and objects for interfacing with

1 Dec 17, 2021
BroBot's files, code and tester.

README - BroBOT Made by Rohan Chaturvedi [email protected] DISCLAIMER: Th

1 Jan 09, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal import asyncio async def main

Myxi 1 Dec 31, 2021
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

48.3k Jan 05, 2023
A bot written in python that send prefilled Google Forms. It supports multithreading for faster execution time.

GoogleFormsBot https://flassy.xyz https://github.com/Shawey/GoogleFormsBot Requirements: os (Default) ast (Default) threading (Default) configparser (

Shawey 1 Jul 10, 2022
Paid Udemy Courses with Coupons

Freedemy Paid Udemy Courses with Coupons Steps to run pip3 install -r requirements.txt python3 free-courses.py Then you can click the Enroll Link and

GOKUL A.P 23 Dec 14, 2022
Mega.nz to GDrive uploader

Mega.nz to GDrive uploader With this telegram bot you can download files from mega.nz and upload those files or telegram uploaded files to GDrive. You

30 Nov 13, 2022
Bitstamp API wrapper for Python

NOTICE: THIS REPOSITORY IS NO LONGER ACTIVELY MAINTAINED It is highly unlikely that I will respond to PRs and questions about usage. This library was

Jack Preston 53 Mar 09, 2022
IMDbPY is a Python package useful to retrieve and manage the data of the IMDb movie database about movies, people, characters and companies

IMDbPY is a Python package for retrieving and managing the data of the IMDb movie database about movies, people and companies. Revamp notice Starting

Davide Alberani 1.1k Jan 02, 2023
Ark API Wrapper in Python

Pythark Ark API Wrapper in Python. Built with Python Requests Installation Pythark uses Arky to create a new transaction, if you want to use this feat

Jolan 14 Mar 11, 2021
A small module to communicate with Triller's API

A small, UNOFFICIAL module to communicate with Triller's API. I plan to add more features/methods in the future.

A3R0 1 Nov 01, 2022
API Wrapper for seedr.cc

Seedr Python Client Seedr API built with 💛 by Souvik Pratiher Hit that Star button if you like this kind of SDKs and wants more of similar SDKs for o

Souvik Pratiher 2 Oct 24, 2021
A simple google translator telegram bot

Translator-Bot A simple google translator telegram bot Please fork this repository don't import code Made with Python3 (C) @FayasNoushad Copyright per

Fayas Noushad 14 Nov 12, 2022
Covid19 API. (Currently Scrapes: worldometers)

Covid19-API An opensource Covid19 API (currently uses worldometer only) Output Examples Covid19 Every Country Data Request URL your-ip/api/all Resp

Amresh Prasad Sinha 14 Oct 03, 2022
A simple terminal UI for viewing fund P/L analysis through TEFAS

Tefas UI A simple terminal UI for viewing fund P/L analysis through TEFAS. Features (that my own bank's UI lack): Daily and weekly P/L FX comparisons

Batuhan Taskaya 4 Mar 14, 2022
A Twitter bot written in Python using Tweepy and hosted on a server.

A Twitter bot written in Python using Tweepy. It can like and/or retweet tweets that contain single or multiple keywords and hashtags.

anniedotexe 11 Dec 15, 2022
Create CDK projects with projen

The Projenator: I'll be back! Description This is a CDKv2 project that takes the grind out of setting up new cdk projects/implementations by using aut

Andrew 2 Dec 11, 2021
Simple base for a telethon bot!

Telethon Bot Simple base used to make a Telegram Bot in telethon. Join @BotzHub! Note: The client, here, is named BotzHub. Fork and add your plugins t

Aditya 54 Oct 21, 2022