load youtube channels from www.youtube.com/{key}

Some channel return a 404 with the /c/ prefix
(ie. https://www.youtube.com/c/@relaxingmusicandvibes)
pull/306/head
Laurent DEFERT 2023-01-10 00:02:05 +01:00
parent f9908a4d3b
commit 9cc6f5eae8
2 changed files with 2 additions and 2 deletions

0
tubesync/manage.py Executable file → Normal file
View File

View File

@ -114,13 +114,13 @@ class Source(models.Model):
}
# Format to use to display a URL for the source
URLS = {
SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/c/{key}',
SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/{key}',
SOURCE_TYPE_YOUTUBE_CHANNEL_ID: 'https://www.youtube.com/channel/{key}',
SOURCE_TYPE_YOUTUBE_PLAYLIST: 'https://www.youtube.com/playlist?list={key}',
}
# Format used to create indexable URLs
INDEX_URLS = {
SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/c/{key}/videos',
SOURCE_TYPE_YOUTUBE_CHANNEL: 'https://www.youtube.com/{key}/videos',
SOURCE_TYPE_YOUTUBE_CHANNEL_ID: 'https://www.youtube.com/channel/{key}/videos',
SOURCE_TYPE_YOUTUBE_PLAYLIST: 'https://www.youtube.com/playlist?list={key}',
}