[dl:http] fail downloads with HTML content (#7697)
add 'validate-html' option
This commit is contained in:
@@ -6166,6 +6166,20 @@ Description
|
||||
instead of downloading a potentially broken file.
|
||||
|
||||
|
||||
downloader.http.validate-html
|
||||
-----------------------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``true``
|
||||
Description
|
||||
Check for unexpected HTML responses.
|
||||
|
||||
Fail file downloads with a ``text/html``
|
||||
`Content-Type header <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Type>`__
|
||||
when expecting a media file instead.
|
||||
|
||||
|
||||
downloader.ytdl.cmdline-args
|
||||
----------------------------
|
||||
Type
|
||||
|
||||
@@ -1020,7 +1020,8 @@
|
||||
"headers" : null,
|
||||
"retry-codes" : [],
|
||||
"sleep-429" : 60.0,
|
||||
"validate" : true
|
||||
"validate" : true,
|
||||
"validate-html" : true
|
||||
},
|
||||
|
||||
"ytdl":
|
||||
|
||||
Reference in New Issue
Block a user