Move DwdScraper to a class
This commit is contained in:
parent
f7cb2ca86e
commit
cf620b86bc
@ -7,6 +7,9 @@ import zipfile
|
||||
import datetime
|
||||
from config.db import db as config_db
|
||||
|
||||
class DwdScraper:
|
||||
|
||||
def run(self):
|
||||
def cleanup_value(v):
|
||||
if int(v) == -999:
|
||||
return None
|
||||
@ -108,3 +111,6 @@ conn.commit()
|
||||
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
DwdScraper().run()
|
||||
|
Loading…
Reference in New Issue
Block a user