mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
avoid printing stack trace on normal youtube_dl unsupported condition (still prints error message unfortunately)
This commit is contained in:
parent
9b13f0c34c
commit
7b92ba39c7
@ -69,13 +69,14 @@ def disclaim_site(site):
|
|||||||
|
|
||||||
ydl_opts = {
|
ydl_opts = {
|
||||||
"outtmpl": "/dev/null",
|
"outtmpl": "/dev/null",
|
||||||
"verbose": True,
|
"verbose": False,
|
||||||
"retries": 3,
|
"retries": 1,
|
||||||
"logger": logging,
|
"logger": logging,
|
||||||
"nocheckcertificate": True,
|
"nocheckcertificate": True,
|
||||||
"hls_prefer_native": True,
|
"hls_prefer_native": True,
|
||||||
"noprogress": True,
|
"noprogress": True,
|
||||||
"nopart": True,
|
"nopart": True,
|
||||||
|
"no_color": True,
|
||||||
}
|
}
|
||||||
if args.proxy_server:
|
if args.proxy_server:
|
||||||
ydl_opts["proxy"] = "http://{}".format(args.proxy_server)
|
ydl_opts["proxy"] = "http://{}".format(args.proxy_server)
|
||||||
@ -109,8 +110,11 @@ def try_youtube_dl(site, crawl_url):
|
|||||||
putmeta(url=crawl_url.url,
|
putmeta(url=crawl_url.url,
|
||||||
content_type="application/vnd.youtube-dl_formats+json;charset=utf-8",
|
content_type="application/vnd.youtube-dl_formats+json;charset=utf-8",
|
||||||
payload=info_json.encode("utf-8"))
|
payload=info_json.encode("utf-8"))
|
||||||
except youtube_dl.utils.UnsupportedError:
|
except BaseException as e:
|
||||||
pass
|
if youtube_dl.utils.UnsupportedError in e.exc_info:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
def brozzle_site(site, browser):
|
def brozzle_site(site, browser):
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user