mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-08 22:42:32 -04:00
PROXY_ATTEMPTS constant
This commit is contained in:
parent
a390c3fcac
commit
d235b02abd
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ thread_local = threading.local()
|
||||||
|
|
||||||
|
|
||||||
YTDLP_PROXY = ""
|
YTDLP_PROXY = ""
|
||||||
YTDLP_TMP = "/tmp"
|
PROXY_ATTEMPTS = 4
|
||||||
YTDLP_WAIT = 10
|
YTDLP_WAIT = 10
|
||||||
|
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ def _remember_videos(page, pushed_videos=None):
|
||||||
|
|
||||||
|
|
||||||
def _try_youtube_dl(worker, ydl, site, page):
|
def _try_youtube_dl(worker, ydl, site, page):
|
||||||
max_attempts = 4 if ydl.isyoutubehost else 1
|
max_attempts = PROXY_ATTEMPTS if ydl.isyoutubehost else 1
|
||||||
attempt = 0
|
attempt = 0
|
||||||
while attempt < max_attempts:
|
while attempt < max_attempts:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue