aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-10-06 18:16:56 +0200
committerneodarz <neodarz@neodarz.net>2018-10-06 18:16:56 +0200
commitd8a4c4016ce30c14ef1df4019cdfb7cc89159a20 (patch)
treea444e2d72a7d77677e2d3d4a925d95f82ec4d414
parent440f1a26ef243f83f1bb2ce43d3e0e7835cf1c1a (diff)
downloadarte.tv-dl-d8a4c4016ce30c14ef1df4019cdfb7cc89159a20.tar.xz
arte.tv-dl-d8a4c4016ce30c14ef1df4019cdfb7cc89159a20.zip
rename module and command
Diffstat (limited to '')
-rw-r--r--README.md2
-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
-rw-r--r--setup.cfg6
4 files changed, 13 insertions, 13 deletions
diff --git a/README.md b/README.md
index 4ec32b7..549cedc 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ pip install .
## Usage
```
-arte_tv
+artetv-dl
```
## Licence
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+"'...")
diff --git a/setup.cfg b/setup.cfg
index 14ef91d..10c67c2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[metadata]
-name = arte
+name = artetv_dl
home-page = https://git.neodarz.net/neodarz/scripts/arte.tv-dl.git
summary = Download videos from arte.tv
description-file =
@@ -22,7 +22,7 @@ classifier =
[files]
packages =
- arte
+ artetv_dl
[extras]
devel=
@@ -33,7 +33,7 @@ devel=
[entry_points]
console_scripts =
- arte = arte.__main__:main
+ artetv-dl = artetv_dl.__main__:main
[wheel]
universal = 1