Archived
update: 更新下载方式
This commit is contained in:
1 file changed
+2
-4
+2
-4
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from urllib.request import urlopen
|
from src.utils.t_download import download
|
||||||
|
|
||||||
|
|
||||||
class SQLite:
|
class SQLite:
|
||||||
@@ -54,7 +54,5 @@ class SQLite:
|
|||||||
if __name__ != '__main__':
|
if __name__ != '__main__':
|
||||||
if not os.path.exists('./src/db/data.sqlite'):
|
if not os.path.exists('./src/db/data.sqlite'):
|
||||||
print('database file not exists, start downloading...')
|
print('database file not exists, start downloading...')
|
||||||
resp = urlopen('https://pac.rtst.tech/static_file_hosting/static/counter/data.sqlite').read()
|
download('https://pac.rtst.tech/static_file_hosting/static/counter/data.sqlite')
|
||||||
with open('./src/db/data.sqlite', 'wb') as fp:
|
|
||||||
fp.write(resp)
|
|
||||||
print('Done.')
|
print('Done.')
|
||||||
Reference in New Issue
Block a user