Move DwdScraper to a class
This commit is contained in:
parent
f7cb2ca86e
commit
cf620b86bc
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user