Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
b9120d1
1
Parent(s):
52c6aac
Update from GitHub Actions
Browse files
main.py
CHANGED
@@ -415,11 +415,10 @@ async def proxy(request: Request):
|
|
415 |
max_retries = 10
|
416 |
retry_delay = 1 # 重试间隔秒数
|
417 |
home_response = None
|
418 |
-
|
419 |
for attempt in range(max_retries):
|
420 |
try:
|
421 |
home_response = scraper.get(home_url, headers= {
|
422 |
-
'referer': 'https://www.baidu.com/',
|
423 |
"sec-fetch-dest": "document"
|
424 |
})
|
425 |
print(f"主页{home_url}响应 (尝试 {attempt + 1}): {home_response.status_code}")
|
|
|
415 |
max_retries = 10
|
416 |
retry_delay = 1 # 重试间隔秒数
|
417 |
home_response = None
|
418 |
+
|
419 |
for attempt in range(max_retries):
|
420 |
try:
|
421 |
home_response = scraper.get(home_url, headers= {
|
|
|
422 |
"sec-fetch-dest": "document"
|
423 |
})
|
424 |
print(f"主页{home_url}响应 (尝试 {attempt + 1}): {home_response.status_code}")
|