diff --git a/README.md b/README.md index 525e888..3b0ffaa 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,9 @@ To run the program on windows, open `run.bat`. On GNU+Linux/MacOS, run `python3 Access youtube URLs by prefixing them with `http://localhost:8080/`, For instance, `http://localhost:8080/https://www.youtube.com/watch?v=vBgulDeV2RU` -You can use an addon such as Redirector ([Firefox](https://addons.mozilla.org/en-US/firefox/addon/redirector/)|[Chrome](https://chrome.google.com/webstore/detail/redirector/ocgpenflpmgnfapjedencafcfakcekcd)) to automatically redirect Youtube URLs to yt-local. I use the include pattern `^(https?://(?:[a-zA-Z0-9_-]*\.)?(?:youtube\.com|youtu\.be)/.*)` and the redirect pattern `http://localhost:8080/$1` (Make sure you're using regular expression mode). +You can use an addon such as Redirector ([Firefox](https://addons.mozilla.org/en-US/firefox/addon/redirector/)|[Chrome](https://chrome.google.com/webstore/detail/redirector/ocgpenflpmgnfapjedencafcfakcekcd)) to automatically redirect Youtube URLs to yt-local. I use the include pattern `^(https?://(?:[a-zA-Z0-9_-]*\.)?(?:youtube\.com|youtu\.be|youtube-nocookie\.com)/.*)` and the redirect pattern `http://localhost:8080/$1` (Make sure you're using regular expression mode). + +If you want embeds on the web to also redirect to yt-local, make sure "Iframes" is checked under advanced options in your redirector rule. yt-local can be added as a search engine in firefox to make searching more convenient. See [here](https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox) for information on firefox search plugins. diff --git a/server.py b/server.py index b388218..9e4f674 100644 --- a/server.py +++ b/server.py @@ -163,6 +163,7 @@ def proxy_video(env, start_response): site_handlers = { 'youtube.com': yt_app, + 'youtube-nocookie.com': yt_app, 'youtu.be': youtu_be, 'ytimg.com': proxy_site, 'yt3.ggpht.com': proxy_site, diff --git a/settings.py b/settings.py index 0d52bc5..edb9211 100644 --- a/settings.py +++ b/settings.py @@ -197,6 +197,14 @@ For security reasons, enabling this is not recommended.''', 'category': 'interface', }), + ('embed_page_mode', { + 'type': bool, + 'label': 'Enable embed page', + 'default': True, + 'comment': '', + 'category': 'interface', + }), + ('autocheck_subscriptions', { 'type': bool, 'default': 0, diff --git a/youtube/templates/embed.html b/youtube/templates/embed.html new file mode 100644 index 0000000..728791b --- /dev/null +++ b/youtube/templates/embed.html @@ -0,0 +1,35 @@ + + +
+ + + +