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 = {
|
||||
"outtmpl": "/dev/null",
|
||||
"verbose": True,
|
||||
"retries": 3,
|
||||
"verbose": False,
|
||||
"retries": 1,
|
||||
"logger": logging,
|
||||
"nocheckcertificate": True,
|
||||
"hls_prefer_native": True,
|
||||
"noprogress": True,
|
||||
"nopart": True,
|
||||
"no_color": True,
|
||||
}
|
||||
if 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,
|
||||
content_type="application/vnd.youtube-dl_formats+json;charset=utf-8",
|
||||
payload=info_json.encode("utf-8"))
|
||||
except youtube_dl.utils.UnsupportedError:
|
||||
pass
|
||||
except BaseException as e:
|
||||
if youtube_dl.utils.UnsupportedError in e.exc_info:
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
def brozzle_site(site, browser):
|
||||
start = time.time()
|
||||
|
Loading…
x
Reference in New Issue
Block a user