Merge branch 'master' of github.com:NFicano/pytube
Browse files* 'master' of github.com:NFicano/pytube:
script entry in setup.py done the **Rightway**(TM)
Update README.rst
Update docs: pytube no longer supports an argument-less download() method
- README.rst +1 -9
- scripts/pytube → pytube/__main__.py +3 -3
- setup.py +6 -1
README.rst
CHANGED
@@ -6,10 +6,6 @@ pytube
|
|
6 |
:alt: Pypi
|
7 |
:target: https://pypi.python.org/pypi/pytube/
|
8 |
|
9 |
-
.. image:: https://img.shields.io/pypi/dm/pytube.svg
|
10 |
-
:alt: Pypi downloads per month
|
11 |
-
:target: https://pypi.python.org/pypi/pytube/
|
12 |
-
|
13 |
.. image:: https://img.shields.io/pypi/pyversions/pytube.svg
|
14 |
:alt: Python Versions
|
15 |
:target: https://pypi.python.org/pypi/pytube/
|
@@ -133,11 +129,7 @@ Library usage
|
|
133 |
# In this case, we'll need to specify both the codec (mp4) and resolution
|
134 |
# (either 360p or 720p).
|
135 |
|
136 |
-
# Okay, let's download it!
|
137 |
-
video.download()
|
138 |
-
|
139 |
-
# If you wanted to choose the output directory, simply pass it as an
|
140 |
-
# argument to the download method.
|
141 |
video.download('/tmp/')
|
142 |
|
143 |
Command-line usage
|
|
|
6 |
:alt: Pypi
|
7 |
:target: https://pypi.python.org/pypi/pytube/
|
8 |
|
|
|
|
|
|
|
|
|
9 |
.. image:: https://img.shields.io/pypi/pyversions/pytube.svg
|
10 |
:alt: Python Versions
|
11 |
:target: https://pypi.python.org/pypi/pytube/
|
|
|
129 |
# In this case, we'll need to specify both the codec (mp4) and resolution
|
130 |
# (either 360p or 720p).
|
131 |
|
132 |
+
# Okay, let's download it! (a destination directory is required)
|
|
|
|
|
|
|
|
|
133 |
video.download('/tmp/')
|
134 |
|
135 |
Command-line usage
|
scripts/pytube → pytube/__main__.py
RENAMED
@@ -5,9 +5,9 @@ import sys
|
|
5 |
import os
|
6 |
import argparse
|
7 |
|
8 |
-
from
|
9 |
-
from
|
10 |
-
from
|
11 |
from pprint import pprint
|
12 |
|
13 |
|
|
|
5 |
import os
|
6 |
import argparse
|
7 |
|
8 |
+
from . import YouTube
|
9 |
+
from .utils import print_status, FullPaths
|
10 |
+
from .exceptions import PytubeError
|
11 |
from pprint import pprint
|
12 |
|
13 |
|
setup.py
CHANGED
@@ -21,7 +21,11 @@ setup(
|
|
21 |
packages=['pytube'],
|
22 |
url="https://github.com/nficano/pytube",
|
23 |
license=license,
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
classifiers=[
|
26 |
"Development Status :: 5 - Production/Stable",
|
27 |
"Environment :: Console",
|
@@ -47,4 +51,5 @@ setup(
|
|
47 |
description=("A Python library for downloading YouTube videos."),
|
48 |
long_description=readme,
|
49 |
zip_safe=True,
|
|
|
50 |
)
|
|
|
21 |
packages=['pytube'],
|
22 |
url="https://github.com/nficano/pytube",
|
23 |
license=license,
|
24 |
+
entry_points={
|
25 |
+
'console_scripts': [
|
26 |
+
'pytube = pytube.__main__:main',
|
27 |
+
],
|
28 |
+
},
|
29 |
classifiers=[
|
30 |
"Development Status :: 5 - Production/Stable",
|
31 |
"Environment :: Console",
|
|
|
51 |
description=("A Python library for downloading YouTube videos."),
|
52 |
long_description=readme,
|
53 |
zip_safe=True,
|
54 |
+
|
55 |
)
|