From 504e93a78d59d51243acbcab6831309805d01fd1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 3 Apr 2016 13:20:05 +0100 Subject: tinkered with some modules and fixed a few bugs, also added the skeleton for the auto_mode.py module. --- modules/youtube.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/youtube.py') diff --git a/modules/youtube.py b/modules/youtube.py index 3c766db8..8cdd2b36 100644 --- a/modules/youtube.py +++ b/modules/youtube.py @@ -58,9 +58,9 @@ class Module(object): video_duration += "%s:" % match.group(1)[:-1].zfill(2 ) if match.group(1) else "" video_duration += "%s:" % match.group(2)[:-1].zfill(2 - ) if match.group(2) else "" + ) if match.group(2) else "00:" video_duration += "%s" % match.group(3)[:-1].zfill(2 - ) if match.group(3) else "" + ) if match.group(3) else "00" return "%s (%s) uploaded by %s, %s views (%s%s%s%s) %s" % ( video_title, video_duration, video_uploader, "{:,}".format( int(video_views)), video_likes, ARROW_UP, ARROW_DOWN, video_dislikes, @@ -72,7 +72,7 @@ class Module(object): if event["args"]: search = event["args"] else: - last_youtube = event["channel"].log.find(REGEX_YOUTUBE) + last_youtube = event["log"].find(REGEX_YOUTUBE) if last_youtube: video_id = re.search(REGEX_YOUTUBE, last_youtube.message).group(1) if search or video_id: -- cgit v1.3.1-10-gc9f91