Move DwdScraper to a class

This commit is contained in:
clerie 2022-02-28 17:02:01 +01:00
parent f7cb2ca86e
commit cf620b86bc

View File

@ -7,6 +7,9 @@ import zipfile
import datetime import datetime
from config.db import db as config_db from config.db import db as config_db
class DwdScraper:
def run(self):
def cleanup_value(v): def cleanup_value(v):
if int(v) == -999: if int(v) == -999:
return None return None
@ -108,3 +111,6 @@ conn.commit()
cur.close() cur.close()
conn.close() conn.close()
if __name__ == "__main__":
DwdScraper().run()