auto-sync: 2026-05-05 00:02:29
This commit is contained in:
@@ -56,7 +56,9 @@ VNPY_DB_PATH = Path("/Volumes/stock/sanguo_vnpy/data/quant_trading.db")
|
||||
ALL_STOCKS_FILE = Path("/Volumes/stock/A股数据/stock_info/stock_basic_info_raw_20260326_113530.csv")
|
||||
PROGRESS_DIR = Path("/Volumes/stock/logs/daily_update/progress")
|
||||
|
||||
REQUEST_INTERVAL = 0.3
|
||||
REQUEST_INTERVAL_SINA = 0.3 # 新浪:稳定,0.3s够
|
||||
REQUEST_INTERVAL_EM = 4.0 # 东方财富:严格3-5s,加随机抖动
|
||||
EM_JITTER = 1.0 # 东方财富随机抖动范围(±秒)
|
||||
MAX_RETRIES = 3
|
||||
CONSECUTIVE_FAIL_PAUSE = 60
|
||||
MAX_CONSECUTIVE_FAILS = 10
|
||||
@@ -66,6 +68,12 @@ GLOBAL_FAIL_THRESHOLD = 30
|
||||
DB_BACKUP_KEEP_DAYS = 7
|
||||
|
||||
HEADERS = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"}
|
||||
HEADERS_EM = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
|
||||
"Referer": "https://quote.eastmoney.com/",
|
||||
"Accept": "*/*",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
}
|
||||
|
||||
|
||||
def setup_logging():
|
||||
|
||||
Reference in New Issue
Block a user