|
|
|
@ -47,6 +47,7 @@ class Twitch(object):
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
def get_messages(self, user_id, since):
|
|
|
|
|
try:
|
|
|
|
|
videos = self._get_videos(user_id)
|
|
|
|
|
result = []
|
|
|
|
|
for video in [v for v in videos if v['date'] >= since]:
|
|
|
|
@ -54,4 +55,9 @@ class Twitch(object):
|
|
|
|
|
self.log.info('Processing VOD %d (%s)', video['id'], video['title'])
|
|
|
|
|
comments = self._get_comments(video['id'])
|
|
|
|
|
result.extend(comments)
|
|
|
|
|
except requests.exceptions.HTTPError as e:
|
|
|
|
|
if self.log:
|
|
|
|
|
self.log.error('Failed to retrieve VOD messages: %s', str(e))
|
|
|
|
|
return None
|
|
|
|
|
else:
|
|
|
|
|
return result
|
|
|
|
|