From 7169eaa885e90e67cffbc6c7fc7f20c2089fdb64 Mon Sep 17 00:00:00 2001 From: Arias800 <24809312+Arias800@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:01:16 +0100 Subject: [PATCH 1/2] 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. --- devine/core/manifests/dash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index dc00f7c..04bdc79 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -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.", From 6a3559bc0fafdaf0da22970c74085de618a89c0f Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sun, 12 Feb 2023 17:54:02 +0000 Subject: [PATCH 2/2] Add Arias800 to the Contributor list in the README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8085bba..acf66cb 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,7 @@ Please refrain from spam or asking for questions that infringe upon a Service's + ## License