diff options
| author | 2016-04-03 13:20:05 +0100 | |
|---|---|---|
| committer | 2016-04-03 13:20:05 +0100 | |
| commit | 504e93a78d59d51243acbcab6831309805d01fd1 (patch) | |
| tree | f5687e4611875e3b4b5e5370492bf7df86e77703 /modules/youtube.py | |
| parent | added code to prevent newlines being where they shouldn't be in outgoing lines. (diff) | |
tinkered with some modules and fixed a few bugs, also added the skeleton for the auto_mode.py module.
Diffstat (limited to 'modules/youtube.py')
| -rw-r--r-- | modules/youtube.py | 6 |
1 files changed, 3 insertions, 3 deletions
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: |
