From f5861546b4f1e07841613d3d8bd0108541daa206 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 28 Apr 2020 07:57:10 +0200 Subject: [PATCH] [core] Support manifest URLs with CDN authentication --- legendary/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index aa43e61..23b2700 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -350,13 +350,16 @@ class LegendaryCore: if base_url not in base_urls: base_urls.append(base_url) + params = dict() if 'queryParams' in manifest: - continue + for param in manifest['queryParams']: + params[param['name']] = param['value'] self.log.debug(f'Downloading manifest from {manifest["uri"]} ...') - r = self.egs.unauth_session.get(manifest['uri']) + r = self.egs.unauth_session.get(manifest['uri'], params=params) r.raise_for_status() new_manifest_data = r.content + break if override_base_url: base_urls = [override_base_url]