diff options
author | neodarz <neodarz@neodarz.net> | 2019-08-05 08:32:45 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-08-05 08:32:45 +0200 |
commit | 6a75776d19d1962759443f02de40e67adc36d7f7 (patch) | |
tree | d78da28afdfd0afdc8c01018e5687c9ba534d89d /artetv_dl | |
parent | a3e774f16120d2b2591e765c165cc07cec465217 (diff) | |
download | arte.tv-dl-6a75776d19d1962759443f02de40e67adc36d7f7.tar.xz arte.tv-dl-6a75776d19d1962759443f02de40e67adc36d7f7.zip |
Fix download
Diffstat (limited to 'artetv_dl')
-rwxr-xr-x | artetv_dl/__main__.py | 14 |
1 files 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()) |