mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
dplay: show an error message if its a bad url
This commit is contained in:
parent
f8877bb970
commit
28bbfc6eab
@ -41,6 +41,9 @@ class Dplay(Service):
|
||||
url = "https://disco-api.{}/content{}".format(self.domain, parse.path)
|
||||
res = self.http.get(url, headers={"x-disco-client": "WEB:UNKNOWN:dplay-client:0.0.1"})
|
||||
janson = res.json()
|
||||
if "errors" in janson:
|
||||
yield ServiceError("Cant find any videos on this url")
|
||||
return
|
||||
|
||||
if self.options.output_auto:
|
||||
directory = os.path.dirname(self.options.output)
|
||||
|
Loading…
Reference in New Issue
Block a user