All Projects → Lartza → SBbrowser

Lartza / SBbrowser

Licence: AGPL-3.0 license
Web frontend to browse the SponsorBlock database written with Django

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to SBbrowser

SponSkrub
Strip advertisements from downloaded YouTube videos
Stars: ✭ 156 (+817.65%)
Mutual labels:  sponsorblock
SponsorBlockSafari
Safari web-extension glue code for SponsorBlock
Stars: ✭ 27 (+58.82%)
Mutual labels:  sponsorblock
script.service.sponsorblock
Kodi add-on for SponsorBlock
Stars: ✭ 83 (+388.24%)
Mutual labels:  sponsorblock
castblock-legacy
Automatically skip integrated ads on youtube playing on chromecast
Stars: ✭ 82 (+382.35%)
Mutual labels:  sponsorblock
SponSkrub
Strip advertisements from downloaded YouTube videos
Stars: ✭ 55 (+223.53%)
Mutual labels:  sponsorblock
Integrations
Open Source integrations for Vanced (SponsorBlock and Return YouTube Dislikes)
Stars: ✭ 22 (+29.41%)
Mutual labels:  sponsorblock
Sponsorblock
Skip YouTube video sponsors (browser extension)
Stars: ✭ 3,627 (+21235.29%)
Mutual labels:  sponsorblock
Piped
An alternative privacy-friendly YouTube frontend which is efficient by design.
Stars: ✭ 1,725 (+10047.06%)
Mutual labels:  sponsorblock

SBTools

SBTools is a Django web service for browsing the SponsorBlock database (https://sponsor.ajay.app/).
The project is tested to work on Python 3.8.

There is a publicly hosted instance of this service at https://sb.ltn.fi/

Installation & Usage

To install the requirements on Linux, psycopg2 needs to be compiled. pip does this automatically if build requirements are available. https://www.psycopg.org/docs/install.html#build-prerequisites

An alternative to building is to use psycopg2-binary. You can edit requirements.txt or install it manually if you can't or don't want to build.
The binary version is not recommended for production by psycopg2 developers and could in certain situations lead to problems, which is why we default to building. https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary

Development

For development you can clone the repo, install requirements.txt (in a venv preferably) and run the Django development server with (venv) python manage.py runserver.

Database should still be migrated to PostgreSQL (e.g. pgloader database.db postgresql://sponsorblock@localhost/sponsorblock) and modified with INSERT INTO config VALUES ('updated', now()); or similar.
Database connection details are configured in SBtools/settings/development.py
The SECRET_KEY doesn't need changing necessarily.

Production

There are helpful files under docs/ for deploying the service.

All examples assume a Linux user sponsorblock with home folder at /srv/sponsorblock/ and proxying the site through Nginx with webroot at /srv/http/sbtools/

You should also have a PostgreSQL user sponsorblock with a database called sponsorblock.
Based on brief testing, using the SQLite database has abysmal performance.

Installing before running could look like the following

[sponsorblock]$ git clone https://github.com/Lartza/SBbrowser.git
[sponsorblock]$ python -m venv /srv/sponsorblock/SBbrowser/venv
[sponsorblock]$ /srv/sponsorblock/SBbrowser/venv/bin/pip install -r /srv/sponsorblock/SBbrowser/requirements.txt
[sponsorblock]$ /srv/sponsorblock/SBbrowser/venv/bin/pip install gunicorn
[sponsorblock]$ DB_PASSWORD='changeme' SECRET_KEY='changeme' STATIC_ROOT='/srv/http/sbtools/static/' DJANGO_SETTINGS_MODULE='SBtools.settings.production' /srv/sponsorblock/SBbrowser/venv/bin/python /srv/sponsorblock/SBbrowser/manage.py collectstatic --noinput

The DB_PASSWORD, SECRET_KEY and STATIC_ROOT variables are also present in files under docs/ and should be modified as needed.
SECRET_KEY should be a large random value and kept secret. You could generate one on https://djecrety.ir/

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

AGPLv3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].