aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-07-30 13:07:16 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-07-30 13:07:16 -0700
commitb3b48967c50ce5d1c11b1424e65e4ef0bc07846a (patch)
tree1efed55ff96daa6ab91aa91f08741707b17d6e19 /youtube
parente78d2393230875ac62c9fadb67c6676081b407c7 (diff)
downloadyt-local-b3b48967c50ce5d1c11b1424e65e4ef0bc07846a.tar.lz
yt-local-b3b48967c50ce5d1c11b1424e65e4ef0bc07846a.tar.xz
yt-local-b3b48967c50ce5d1c11b1424e65e4ef0bc07846a.zip
Bugfix: Support integer-only ?t param
When there's only an integer, and no unit, it's all in seconds
Diffstat (limited to 'youtube')
-rw-r--r--youtube/watch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index 0a48653..d102457 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -382,6 +382,8 @@ def get_watch_page(video_id=None):
if re.fullmatch(r'(\d+(h|m|s))+', time_start_str):
for match in re.finditer(r'(\d+)(h|m|s)', time_start_str):
time_start += int(match.group(1))*time_table[match.group(2)]
+ elif re.fullmatch(r'\d+', time_start_str):
+ time_start = int(time_start_str)
lc = request.args.get('lc', '')
playlist_id = request.args.get('list')