提交代码
This commit is contained in:
BIN
polymarket.db
BIN
polymarket.db
Binary file not shown.
@@ -231,7 +231,7 @@ def save_snapshot(bucket_ts: int, fetched_at: int, raw: Dict[str, Any], db_path:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_db("../polymarket.db")
|
||||
init_db("../../polymarket.db")
|
||||
|
||||
while True:
|
||||
data = fetch_current_market(
|
||||
@@ -242,5 +242,5 @@ if __name__ == "__main__":
|
||||
probe_offsets=(0, -900, 900), # 先试当前,再试前一档/后一档
|
||||
)
|
||||
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../polymarket.db")
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../../polymarket.db")
|
||||
print("saved:", data["bucket_ts"], data["fetched_at"])
|
||||
@@ -231,7 +231,7 @@ def save_snapshot(bucket_ts: int, fetched_at: int, raw: Dict[str, Any], db_path:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_db("../polymarket.db")
|
||||
init_db("../../polymarket.db")
|
||||
|
||||
while True:
|
||||
data = fetch_current_market(
|
||||
@@ -242,5 +242,5 @@ if __name__ == "__main__":
|
||||
probe_offsets=(0, -900, 900), # 先试当前,再试前一档/后一档
|
||||
)
|
||||
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../polymarket.db")
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../../polymarket.db")
|
||||
print("saved:", data["bucket_ts"], data["fetched_at"])
|
||||
BIN
polymarket/数据抓取/polymarket.db
Normal file
BIN
polymarket/数据抓取/polymarket.db
Normal file
Binary file not shown.
@@ -231,7 +231,7 @@ def save_snapshot(bucket_ts: int, fetched_at: int, raw: Dict[str, Any], db_path:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_db("../polymarket.db")
|
||||
init_db("../../polymarket.db")
|
||||
|
||||
while True:
|
||||
data = fetch_current_market(
|
||||
@@ -242,5 +242,5 @@ if __name__ == "__main__":
|
||||
probe_offsets=(0, -900, 900), # 先试当前,再试前一档/后一档
|
||||
)
|
||||
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../polymarket.db")
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../../polymarket.db")
|
||||
print("saved:", data["bucket_ts"], data["fetched_at"])
|
||||
@@ -231,7 +231,7 @@ def save_snapshot(bucket_ts: int, fetched_at: int, raw: Dict[str, Any], db_path:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
init_db("../polymarket.db")
|
||||
init_db("../../polymarket.db")
|
||||
|
||||
while True:
|
||||
data = fetch_current_market(
|
||||
@@ -242,5 +242,5 @@ if __name__ == "__main__":
|
||||
probe_offsets=(0, -900, 900), # 先试当前,再试前一档/后一档
|
||||
)
|
||||
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../polymarket.db")
|
||||
save_snapshot(data["bucket_ts"], data["fetched_at"], data, "../../polymarket.db")
|
||||
print("saved:", data["bucket_ts"], data["fetched_at"])
|
||||
@@ -340,7 +340,7 @@ def fetch_crypto_worker(crypto_config: Dict[str, str], db_path: str, stop_event:
|
||||
|
||||
def main():
|
||||
"""主函数:启动多个线程并行抓取所有币种数据"""
|
||||
db_path = "../polymarket.db"
|
||||
db_path = "./polymarket.db"
|
||||
init_db(db_path)
|
||||
|
||||
stop_event = threading.Event()
|
||||
Reference in New Issue
Block a user