more documentation
Marco Andronaco andronacomarco@gmail.com
Sat, 26 Aug 2023 14:03:50 +0200
3 files changed,
51 insertions(+),
1 deletions(-)
M
README.md
→
README.md
@@ -1,6 +1,11 @@
# FixYouTube Embed YouTube videos on Telegram, Discord and more! +## How to use: +Replace `www.youtube.com` or `youtu.be` with `y.outube.duckdns.org` to fix embeds for short videos. + +You can find a short video demo [here](https://github.com/BiRabittoh/FixYouTube/assets/26506860/2896d39e-a86e-47ce-939a-785b73d11683). + ## Instructions (Docker) ### With reverse proxy
A
fixyoutube/templates/index.html
@@ -0,0 +1,45 @@
+ +<!doctype html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta property="og:title" content="FixYouTube" /> + <meta property="og:site_name" content="FixYouTube" /> + <meta property="og:description" content="Embed YouTube videos on Telegram, Discord and more!" /> + <title>FixYouTube</title> + + <link rel="icon" + href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🛠</text></svg>"> + <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css"> + +</head> + +<body onload="code = document.createElement('code'); code.innerText = window.location.host; document.getElementById('changeme').replaceWith(code);"> + <main class="container" style="max-width: 35rem"> + <hgroup> + <h1>FixYouTube</h1> + <h2>Embed YouTube videos on Telegram, Discord and more!</h2> + </hgroup> + <p>FixYouTube serves fixed YouTube video embeds. Heavily inspired by <a href="https://fxtwitter.com">fxtwitter.com</a> and <a href="https://ddinstagram.com">ddinstagram.com</a>.</p> + + <section> + <header> + <h3 style="margin-bottom: 4px">How to Use</h3> + <p>Replace <code>www.youtube.com</code> or <code>youtu.be</code> with <span id="changeme">this domain</span> to fix embeds for short videos.</p> + </header> + <video + src="https://github.com/BiRabittoh/FixYouTube/assets/26506860/2896d39e-a86e-47ce-939a-785b73d11683" + controls="controls" muted="muted" style="width: 100%; max-height: 100%;"> + Your browser does not support the video tag. + </video> + <hr> + <small><a href="{{ repo_url }}" target="_blank">Source code available in GitHub!</a></small> + <br> + <small>• YouTube is a trademark of Google LLC. This app is not affiliated with Google LLC.</small> + </section> + </main> +</body> + +</html>
M
fixyoutube/views.py
→
fixyoutube/views.py
@@ -8,7 +8,7 @@ import re
def main_handler(request, video_id): if video_id == "": - return redirect(c.REPO_URL) + return render_template("index.html", repo_url=c.REPO_URL) user_agent = request.headers.get("User-Agent", "") result = re.findall(c.UA_REGEX, user_agent, flags=re.I)