mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
silence youtube-dl's logging, use only our own
because youtube-dl's can be annoyingly verbose, confusing, doesn't tell us the things we're interested in, and doesn't tell us where the messages originate
This commit is contained in:
parent
e5536182dc
commit
9211fb45ec
@ -244,19 +244,23 @@ def _build_youtube_dl(worker, destdir, site):
|
|||||||
|
|
||||||
ydl_opts = {
|
ydl_opts = {
|
||||||
"outtmpl": "{}/ydl%(autonumber)s.out".format(destdir),
|
"outtmpl": "{}/ydl%(autonumber)s.out".format(destdir),
|
||||||
"verbose": False,
|
|
||||||
"retries": 1,
|
"retries": 1,
|
||||||
"logger": logging.getLogger("youtube_dl"),
|
|
||||||
"nocheckcertificate": True,
|
"nocheckcertificate": True,
|
||||||
"hls_prefer_native": True,
|
"hls_prefer_native": True,
|
||||||
"noprogress": True,
|
"noprogress": True,
|
||||||
"nopart": True,
|
"nopart": True,
|
||||||
"no_color": True,
|
"no_color": True,
|
||||||
"progress_hooks": [maybe_heartbeat_site_last_claimed],
|
"progress_hooks": [maybe_heartbeat_site_last_claimed],
|
||||||
|
|
||||||
# https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection
|
# https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection
|
||||||
# "best: Select the best quality format represented by a single
|
# "best: Select the best quality format represented by a single
|
||||||
# file with video and audio."
|
# file with video and audio."
|
||||||
"format": "best/bestvideo+bestaudio",
|
"format": "best/bestvideo+bestaudio",
|
||||||
|
|
||||||
|
### we do our own logging
|
||||||
|
# "logger": logging.getLogger("youtube_dl"),
|
||||||
|
"verbose": False,
|
||||||
|
"quiet": True,
|
||||||
}
|
}
|
||||||
if worker._proxy_for(site):
|
if worker._proxy_for(site):
|
||||||
ydl_opts["proxy"] = "http://{}".format(worker._proxy_for(site))
|
ydl_opts["proxy"] = "http://{}".format(worker._proxy_for(site))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user