|
|
@@ -1,11 +1,12 @@
|
|
|
import asyncio
|
|
|
+import os
|
|
|
import random
|
|
|
import re
|
|
|
import sqlite3
|
|
|
import httpx
|
|
|
|
|
|
# 1, 更新数据库, 2, 读取数据库, 关键词过滤输出
|
|
|
-opt = 2
|
|
|
+opt = 1
|
|
|
|
|
|
# 代理 ip
|
|
|
proxy = 'http://127.0.0.1:7890'
|
|
|
@@ -154,6 +155,9 @@ class LOADCLDATA:
|
|
|
|
|
|
def connect(self):
|
|
|
"""连接到 SQLite 数据库"""
|
|
|
+ if not os.path.exists(self.db_name):
|
|
|
+ c = GETCLDATA()
|
|
|
+ asyncio.run(c.main())
|
|
|
self.conn = sqlite3.connect(self.db_name)
|
|
|
self.cursor = self.conn.cursor()
|
|
|
|