Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mirukana/ctube
A simple self-hosted front-end for YouTube, powered by youtube-dl
https://github.com/mirukana/ctube
front-end python self-hosted youtube youtube-dl
Last synced: about 2 months ago
JSON representation
A simple self-hosted front-end for YouTube, powered by youtube-dl
- Host: GitHub
- URL: https://github.com/mirukana/ctube
- Owner: mirukana
- Created: 2021-04-04T00:52:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-23T17:32:17.000Z (over 3 years ago)
- Last Synced: 2023-10-20T21:50:27.400Z (about 1 year ago)
- Topics: front-end, python, self-hosted, youtube, youtube-dl
- Language: Python
- Homepage:
- Size: 497 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CTube
A simple self-hosted front-end for YouTube, powered by youtube-dl.
## Features
- Searches
- Channel video lists
- Likes, dislikes, view count, uploader, upload date, description and tags
- Comments sorted by date
- Related entries for video being watched, based on video tags and title
- Global "recommendations" on homepage, based on commonly watched tags frecency
- Dims thumbnails for already watched videos
- Reactive layout taking maximum advantage of any window size
- Doesn't have a light theme
- *Currently* uses YouTube's embedded player
- Uses a stupid amount of iframes to minimize javascript usage and speed up
page rendering while youtube-dl responses are loading## Installation
Requires Python 3.6+ and pip. There might be two pip commands on your system,
check `pip3 --version` and `pip --version` to determine which one is available
and corresponds to Python 3.Make sure *~/.local/bin* is in your `PATH` (add
`export PATH="$HOME/.local/bin:$PATH"` to `/etc/profile`).1. Clone the repository: `git clone https://github.com/mirukana/ctube`
2. Enter the cloned repository: `cd ctube`
3. Install the python requirements: `pip3 install --user -Ur requirements.txt`
4. Launch the server: `./run.sh`
5. Visit some youtube-like URLs, e.g.The server binds to localhost on port 8000 by default, see `./run.sh --help`
for options.## Updating
1. Go to the cloned repository and update the source code: `git pull`
2. Update the python requirements: `pip3 install --user -Ur requirements.txt`youtube-dl and youtube-comment-downloader, part of the python requirements,
need to be frequently kept up-to-date to fix new issues with YouTube.## Stored data
Recommendation system data such as last watched video dates, tag frequencies
and such are stored in `~/.local/share/ctube`.If you make your server accessible outside of your local machine
(e.g. with `./run.sh --host 0.0.0.0`), be aware that any connecting client
will share the same set of data.## Embedded player ads
If your browser doesn't support uBlock or similar but can run GreaseMonkey
scripts (e.g. pre-2.0 qutebrowser), you can use a script like below to
clean up what remains on the embedded YouTube player:```javascript
// ==UserScript==
// @name Youtube Cleaner
// @namespace youtube_cleaner
// @version 0.1
// @match *://www.youtube-nocookie.com/*
// @run-at document-end
// ==/UserScript==var style = document.createElement("style");
style.type = "text/css"
style.id = "youtube-cleaner"
style.textContent = `
.video-ads, .ytp-pause-overlay {
display: none !important;
}
`document.getElementsByTagName("head")[0].appendChild(style)
```