diff options
-rw-r--r-- | scrapersources/postliste-oslo-kommune-byraadsavdelingene | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scrapersources/postliste-oslo-kommune-byraadsavdelingene b/scrapersources/postliste-oslo-kommune-byraadsavdelingene index b54d182..0fa0c57 100644 --- a/scrapersources/postliste-oslo-kommune-byraadsavdelingene +++ b/scrapersources/postliste-oslo-kommune-byraadsavdelingene @@ -171,8 +171,9 @@ skiplimit = 10 totalcount = 0 # Look forward one week to at least get past the weekends, rescan the -# last day in case new records showed up in the mean time. -for n in xrange(skiplimit+1): +# last day in case new records showed up in the mean time. Next, scan +# backwards, one day before the oldest entry in the database. +for n in range(0, skiplimit, 1): day = newest + aday * n # print day totalcount = totalcount + fetch_day(parser, day) @@ -180,9 +181,8 @@ for n in xrange(skiplimit+1): print "Running short on CPU time, exiting" sys.exit(0) -# Scan backwards, one day before the oldest entry in the database -for n in xrange(skiplimit): - day = oldest - aday * (n+1) +for n in range(-1, -skiplimit, -1): + day = oldest + aday * n # print day totalcount = totalcount + fetch_day(parser, day) if cpu_spent() > (cpu_available() - 3): |