diff --git a/timesearch_modules/livestream.py b/timesearch_modules/livestream.py index 992a2a0..fd0cc8d 100644 --- a/timesearch_modules/livestream.py +++ b/timesearch_modules/livestream.py @@ -1,4 +1,5 @@ import copy +import prawcore import time import traceback @@ -152,6 +153,10 @@ def _livestream_as_a_generator( ) newitems = database.insert(items) yield newitems + except prawcore.exceptions.NotFound: + print(database.filepath.basename, '404 not found') + step = {'tsdb': database, 'new_comments': 0, 'new_submissions': 0} + yield step except Exception: traceback.print_exc() print('Retrying...')