diff --git a/api/sync_with_twitch.py b/api/sync_with_twitch.py index 1219965..6148449 100644 --- a/api/sync_with_twitch.py +++ b/api/sync_with_twitch.py @@ -67,7 +67,7 @@ def main(): if last: videos = [v for v in videos if v['date'] >= last.date] last_id = last.id - QUOTE = re.compile(r'^\!quote\s+add\s+(.+)$') + QUOTE = re.compile(r'^\!quote\s+add\s+(?P")?(?P.+)(?(q)")$') quotes = [] for video in videos: app.logger.info('Processing video %d (%s)', video['id'], video['title']) @@ -76,7 +76,7 @@ def main(): m = QUOTE.match(comment) if m: quotes.append(dict( - text=m.group(1), + text=m.group('text'), video_id=video['id'], game=video['game'], date=video['date']))