Skip to content

kendoodoo/tuberepair-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TubeRepair server, using Flask and Jinja2.

  • Works out of the box, edit the backend to your likings.
  • Fetches from Youtube Private API without using a key
  • Works with Classic YouTube, 1.0 to 2.2.0 for Google YouTube
  • ⚠️ This project will always be in beta. You can help in bag's discord ⚠️
  • ⚠️ You can also fork this repo and create pull request if you'll like to add or fix things!⚠️

Features

  • Cache API responses
  • Customizable config
  • Docker compatible
  • Infinite scroling in search, channels, playlist, playlist videos, and comment
  • Allows users to select a video resolution in URL (example.com/360)
  • Supports sending request via proxie with Socks5 or Https (https://scrapfly.io/blog/python-requests-proxy-intro/)

In the future

  • Based all requests via innertube (ditching invidious and request to youtube Private API directly)
  • Private server with password protection and secrets

Setting up

Make sure you have Python (3.8 minimum) and virtualenv (optional) installed.

# Download
git clone https://github.com/kevinf100/tuberepair.uptimetrackers.com
mv tuberepair.uptimetrackers.com/ tuberepairdocker/
cd tuberepairdocker/tuberepair

# Preparing virtualenv
# You can just skip to pip, but for good measures.
virtualenv tuberepair
source tuberepair/bin/activate
pip install -r requirements.txt

# Running
python main.py

other notes

Since YouTube is getting more aggressive with blockage, I suggest you host yourself a Invidious instance, and set it via config.py. This makes sure that video will load (not metadata)...

...you could also use proxies to bypass this (as mentioned above), but that requires extensive "birdwatching" and a pain to deal with.

Docker

Make sure you have Linux, ports 80 and 443 open, Docker, and DNS record already pointing to your server.

# Download
git clone https://github.com/kevinf100/tuberepair.uptimetrackers.com
mv tuberepair.uptimetrackers.com/ tuberepairdocker/
cd tuberepairdocker
cp ./example/.env ../
cp ./example/docker-compose-example.yml ./example/docker-compose.yml 

docker-compose setup

Next you'll need to edit the .env file or you can edit the docker-compose.yml directly.
The .env in example is the bare minimum you need for the server to run.
You can always add more to it.

If you're NOT running Docker rootless
Uncomment the lines in docker-compose.yml that say to uncomment it (Lines 38 and 56) and comment that lines above them (Lines 37 and 55). Comment the user USERID line (line 3) in .env.
If you're running Docker rootless
Get your userid

bash
id -u

add it to USERID in the .env file.

Start

Once you edit the docker-compose.yml you are done and can run the server!

# Start
docker compose up -d --build

Credits

Contributors

Code

I will not copy code that explicitly states "do not modify".

About

Custom backend server written in python, for the TubeRepair tweak.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5