mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
minor edits
This commit is contained in:
parent
d235b02abd
commit
d8ebf2824e
@ -368,7 +368,7 @@ def _try_youtube_dl(worker, ydl, site, page):
|
|||||||
attempt += 1
|
attempt += 1
|
||||||
if attempt == max_attempts:
|
if attempt == max_attempts:
|
||||||
logging.warning(
|
logging.warning(
|
||||||
"Failed after %s attempts. Error: %s", max_attempts, e
|
"Failed after %s attempt(s). Error: %s", max_attempts, e
|
||||||
)
|
)
|
||||||
raise brozzler.VideoExtractorError(
|
raise brozzler.VideoExtractorError(
|
||||||
"yt-dlp hit error extracting info for %s" % ydl.url
|
"yt-dlp hit error extracting info for %s" % ydl.url
|
||||||
@ -422,7 +422,7 @@ def do_youtube_dl(worker, site, page):
|
|||||||
Returns:
|
Returns:
|
||||||
`list` of `str`: outlink urls
|
`list` of `str`: outlink urls
|
||||||
"""
|
"""
|
||||||
with tempfile.TemporaryDirectory(prefix="brzl-ydl-", dir=YTDLP_TMP) as tempdir:
|
with tempfile.TemporaryDirectory(prefix="brzl-ydl-") as tempdir:
|
||||||
ydl = _build_youtube_dl(worker, tempdir, site, page)
|
ydl = _build_youtube_dl(worker, tempdir, site, page)
|
||||||
ie_result = _try_youtube_dl(worker, ydl, site, page)
|
ie_result = _try_youtube_dl(worker, ydl, site, page)
|
||||||
outlinks = set()
|
outlinks = set()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user