forked from DRMTalks/devine
Detect redirection
If the manifest is hidden behind a redirect, the url is not updated and the segments are created with the old url. I found a French service where this situation occurred. After this change, it was possible to correctly parse the mpd.
This commit is contained in:
parent
4b5a2c703b
commit
7169eaa885
|
@ -49,6 +49,9 @@ class DASH:
|
|||
raise TypeError(f"Expected session to be a {Session}, not {session!r}")
|
||||
|
||||
res = session.get(url, **args)
|
||||
if res.url != url:
|
||||
url = res.url
|
||||
|
||||
if not res.ok:
|
||||
raise requests.ConnectionError(
|
||||
"Failed to request the MPD document.",
|
||||
|
|
Loading…
Reference in New Issue