feat: 添加首选国家头以支持代理配置

This commit is contained in:
晓丰 2025-05-30 22:52:32 +08:00
parent ae7d23a59e
commit d33c37db27

View File

@ -231,6 +231,7 @@ def gettoken(proxy, r=2):
copy_headers['x-dm-visit-id'] = str(int(time.time() * 1000))
copy_headers['x-dm-visitor-id'] = uuid_with_dash
copy_headers['User-Agent'] = UserAgent[random.randint(0, len(UserAgent) - 1)]
copy_headers['X-DM-Preferred-Country'] = proxy.lower()
with _cache_lock:
_headers_cache = copy_headers
return copy_headers