if the very first API call fails it is very unlikely that there are new papers at all, no need to try multiple pages

This commit is contained in:
Andrej Karpathy 2021-11-26 20:10:32 -08:00
parent aa877c9397
commit d2582c5b77

View File

@ -92,6 +92,9 @@ if __name__ == '__main__':
if args.break_after > 0 and zero_updates_in_a_row >= args.break_after:
logging.info("breaking out early, no new papers %d times in a row" % (args.break_after, ))
break
elif k == 0:
logging.info("our very first call for the latest there were no new papers, exitting")
break
else:
zero_updates_in_a_row = 0