Spaces:
Running
Running
Update watcher.py
Browse files- watcher.py +2 -2
watcher.py
CHANGED
|
@@ -80,7 +80,7 @@ def fetch_download_links(youtube_url):
|
|
| 80 |
res = requests.post(
|
| 81 |
SSYOUTUBE_URL,
|
| 82 |
data={"videoURL": youtube_url},
|
| 83 |
-
timeout=
|
| 84 |
headers={
|
| 85 |
"User-Agent": "Mozilla/5.0",
|
| 86 |
"Referer": "https://ssyoutube.online/",
|
|
@@ -209,7 +209,7 @@ def merge_video_on_server(video_url, audio_url, video_id, quality, video_title,
|
|
| 209 |
monitor_url = result["data"]["result"]["monitor"]["http"]
|
| 210 |
|
| 211 |
# 完了するまでポーリング
|
| 212 |
-
max_attempts =
|
| 213 |
attempt = 0
|
| 214 |
|
| 215 |
while attempt < max_attempts:
|
|
|
|
| 80 |
res = requests.post(
|
| 81 |
SSYOUTUBE_URL,
|
| 82 |
data={"videoURL": youtube_url},
|
| 83 |
+
timeout=20,
|
| 84 |
headers={
|
| 85 |
"User-Agent": "Mozilla/5.0",
|
| 86 |
"Referer": "https://ssyoutube.online/",
|
|
|
|
| 209 |
monitor_url = result["data"]["result"]["monitor"]["http"]
|
| 210 |
|
| 211 |
# 完了するまでポーリング
|
| 212 |
+
max_attempts = 10 # 最大60回試行(30秒間隔で約30分)
|
| 213 |
attempt = 0
|
| 214 |
|
| 215 |
while attempt < max_attempts:
|