aboutsummaryrefslogtreecommitdiff
path: root/artetv_dl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--artetv_dl/__init__.py (renamed from arte/__init__.py)0
-rwxr-xr-xartetv_dl/__main__.py (renamed from arte/__main__.py)18
2 files changed, 9 insertions, 9 deletions
diff --git a/arte/__init__.py b/artetv_dl/__init__.py
index e69de29..e69de29 100644
--- a/arte/__init__.py
+++ b/artetv_dl/__init__.py
diff --git a/arte/__main__.py b/artetv_dl/__main__.py
index a9e30df..d85f5f6 100755
--- a/arte/__main__.py
+++ b/artetv_dl/__main__.py
@@ -13,28 +13,28 @@ def main():
print("Example:")
print(" "+sys.argv[0]+" https://www.arte.tv/fr/videos/051868-000-A/liberte-egalite-indemnites-vers-un-revenu-universel/")
sys.exit(0)
-
+
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'])
-
+
url = re.split("url=",url)[1]
url = re.split("\?autostart", url)[0]
-
+
content = urlopen(url)
json = json.loads(content.read().decode())
name = json['videoJsonPlayer']['VTI']
url = json['videoJsonPlayer']['VSR']['HTTPS_SQ_1']['url']
-
+
name=name+".mp4"
try:
print("Downloading '"+name+"'...")