From 6a75776d19d1962759443f02de40e67adc36d7f7 Mon Sep 17 00:00:00 2001 From: neodarz Date: Mon, 5 Aug 2019 08:32:45 +0200 Subject: Fix download --- artetv_dl/__main__.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/artetv_dl/__main__.py b/artetv_dl/__main__.py index 814b2f1..8e6c759 100755 --- a/artetv_dl/__main__.py +++ b/artetv_dl/__main__.py @@ -16,19 +16,9 @@ def main(): url = sys.argv[1] - content = urlopen(url) - - soup = BeautifulSoup(content, "lxml") - - iframes = soup.find_all("iframe") - - url = "" - - for iframe in iframes: - url = unquote(iframe['src']) + programId = re.findall('[0-9A-Z]{6}-[0-9A-Z]{3}-[0-9A-Z]', url)[0] - url = re.split("url=",url)[1] - url = re.split("\?autostart", url)[0] + url = "https://api.arte.tv/api/player/v1/config/en/{}".format(programId) content = urlopen(url) json_data = json.loads(content.read().decode()) -- cgit v1.2.1