X-Git-Url: https://plomlompom.com/repos/?p=berlin-corona-table;a=blobdiff_plain;f=scrape.py;h=e449b998b2821f4fe1fe9539fc1fbf28b2898b9c;hp=41a0db9d3c44a5781a66d7dbf02be6200c2df34c;hb=4289e3ee6177babe630e973d5a2d5049538ab96e;hpb=402755409e719a9e2cba7a9dcb1482b5834a3aa1 diff --git a/scrape.py b/scrape.py index 41a0db9..e449b99 100755 --- a/scrape.py +++ b/scrape.py @@ -104,12 +104,10 @@ fixes = { # compromise to keep as many surrounding numbers stable as possible. datetime.datetime(2020, 3, 26): { 'SZ': { - 'growth': 12, - 'total': 132 + 'growth': 12 }, 'sum': { - 'growth': 286, - 'total': 1931 + 'growth': 286 } }, # Here the official total is 220, while the summation of district @@ -121,7 +119,7 @@ fixes = { }, } -# Scan navigation bar for maximum pagination value. +# Scan navigation bar for maximum pagination value. url = url_prefix + pm_dir with urllib.request.urlopen(url) as response: html = response.read() @@ -147,7 +145,7 @@ for i in range(max_page): continue day_urls += [link['href']] -# Collect infection data. +# Collect infection data. data = {} first_run = True districts_sorted = []