mirror of
https://github.com/ethanrusz/youtube-url-corrector.git
synced 2025-04-20 15:06:32 -04:00
Compare commits
No commits in common. "2096898fd1a106d3d9be44b22a83630fdeb59aa9" and "08557106b47cec1bd07b242d62134e22035af89d" have entirely different histories.
2096898fd1
...
08557106b4
2 changed files with 1 additions and 16 deletions
15
README.md
15
README.md
|
@ -1,15 +1,2 @@
|
|||
# youtube-url-corrector
|
||||
A Python based Discord bot to redirect YouTube links to Piped.
|
||||
|
||||
Example `compose.yml`
|
||||
```yml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
bot:
|
||||
image: git.beans.team/em/yuc:latest
|
||||
environment:
|
||||
- DISCORD_TOKEN=your_discord_bot_token
|
||||
- PIPED_URL=https://your.piped.url/watch?v=
|
||||
restart: unless-stopped
|
||||
```
|
||||
A Python bot to redirect YouTube links to Piped.
|
||||
|
|
2
bot.py
2
bot.py
|
@ -52,8 +52,6 @@ async def get_youtube_id(url: str, ignore_playlist=True) -> str:
|
|||
return query.path.split('/')[2]
|
||||
if query.path[:3] == '/v/':
|
||||
return query.path.split('/')[2]
|
||||
if query.path[:8] == '/shorts/':
|
||||
return query.path.split('/')[1]
|
||||
|
||||
|
||||
bot.run(DISCORD_TOKEN)
|
||||
|
|
Loading…
Add table
Reference in a new issue