add support for youtube shorts
Marco Andronaco andronacomarco@gmail.com
Tue, 29 Aug 2023 15:21:17 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
escarbot/replace.py
→
escarbot/replace.py
@@ -35,7 +35,7 @@ return '{}:{:02}:{:02}'.format(hours, minutes, seconds)
replacers = [ { - "regex": re.compile(r"(?:(?:https?:)?\/\/)?(?:(?:www|m)\.)?(?:(?:youtube(?:-nocookie)?\.com|youtu.be))(?:\/(?:[\w\-]+\?v=|embed\/|live\/|v\/)?)([\w\-]+)(\S+)?", re_flags), + "regex": re.compile(r"(?:(?:https?:)?\/\/)?(?:(?:www|m)\.)?(?:(?:youtube(?:-nocookie)?\.com|youtu.be))(?:\/(?:[\w\-]+\?v=|embed\/|live\/|v\/|shorts\/)?)([\w\-]+)(\S+)?", re_flags), "becomes": "https://y.outube.duckdns.org/{}", "timestamp": youtube_timestamp },