mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
[cleanup] Fix linter and some typos
* Also remove inconsistent use of `"` in setup.py
This commit is contained in:
parent
ef39f8600a
commit
e28f1c0ae8
|
@ -33,11 +33,11 @@ ### 2021.04.22
|
||||||
* Add option `--skip-playlist-after-errors` to skip the rest of a playlist after a given number of errors are encountered
|
* Add option `--skip-playlist-after-errors` to skip the rest of a playlist after a given number of errors are encountered
|
||||||
* Merge youtube-dl: Upto [commit/7e8b3f9](https://github.com/ytdl-org/youtube-dl/commit/7e8b3f9439ebefb3a3a4e5da9c0bd2b595976438)
|
* Merge youtube-dl: Upto [commit/7e8b3f9](https://github.com/ytdl-org/youtube-dl/commit/7e8b3f9439ebefb3a3a4e5da9c0bd2b595976438)
|
||||||
* [downloader] Fix bug in downloader selection
|
* [downloader] Fix bug in downloader selection
|
||||||
* [BilibiliChannel] Fix pagination by [nao20010128nao](https://github.com/nao20010128nao) and[pukkandan](https://github.com/pukkandan)
|
* [BilibiliChannel] Fix pagination by [nao20010128nao](https://github.com/nao20010128nao) and [pukkandan](https://github.com/pukkandan)
|
||||||
* [rai] Add support for http formats by [nixxo](https://github.com/nixxo)
|
* [rai] Add support for http formats by [nixxo](https://github.com/nixxo)
|
||||||
* [TubiTv] Add TubiTvShowIE by [Ashish0804](https://github.com/Ashish0804)
|
* [TubiTv] Add TubiTvShowIE by [Ashish0804](https://github.com/Ashish0804)
|
||||||
* [twitcasting] Fix extractor
|
* [twitcasting] Fix extractor
|
||||||
* [viu:ott] Fix extractor and support series by [lkho](https://github.com/lkho) and[pukkandan](https://github.com/pukkandan)
|
* [viu:ott] Fix extractor and support series by [lkho](https://github.com/lkho) and [pukkandan](https://github.com/pukkandan)
|
||||||
* [youtube:tab] Show unavailable videos in playlists by [colethedj](https://github.com/colethedj)
|
* [youtube:tab] Show unavailable videos in playlists by [colethedj](https://github.com/colethedj)
|
||||||
* [youtube:tab] Reload with unavailable videos for all playlists
|
* [youtube:tab] Reload with unavailable videos for all playlists
|
||||||
* [youtube] Ignore invalid stretch ratio
|
* [youtube] Ignore invalid stretch ratio
|
||||||
|
|
60
setup.py
60
setup.py
|
@ -18,13 +18,13 @@
|
||||||
LONG_DESCRIPTION = '\n\n'.join((
|
LONG_DESCRIPTION = '\n\n'.join((
|
||||||
'Official repository: <https://github.com/yt-dlp/yt-dlp>',
|
'Official repository: <https://github.com/yt-dlp/yt-dlp>',
|
||||||
'**PS**: Many links in this document will not work since this is a copy of the README.md from Github',
|
'**PS**: Many links in this document will not work since this is a copy of the README.md from Github',
|
||||||
open("README.md", "r", encoding="utf-8").read()))
|
open('README.md', 'r', encoding='utf-8').read()))
|
||||||
|
|
||||||
REQUIREMENTS = ['mutagen', 'pycryptodome']
|
REQUIREMENTS = ['mutagen', 'pycryptodome']
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
|
if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':
|
||||||
print("inv")
|
print('inv')
|
||||||
else:
|
else:
|
||||||
files_spec = [
|
files_spec = [
|
||||||
('share/bash-completion/completions', ['completions/bash/yt-dlp']),
|
('share/bash-completion/completions', ['completions/bash/yt-dlp']),
|
||||||
|
@ -67,17 +67,17 @@ def run(self):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
packages = find_packages(exclude=("youtube_dl", "test", "ytdlp_plugins"))
|
packages = find_packages(exclude=('youtube_dl', 'test', 'ytdlp_plugins'))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="yt-dlp",
|
name='yt-dlp',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
maintainer="pukkandan",
|
maintainer='pukkandan',
|
||||||
maintainer_email="pukkandan.ytdlp@gmail.com",
|
maintainer_email='pukkandan.ytdlp@gmail.com',
|
||||||
description=DESCRIPTION,
|
description=DESCRIPTION,
|
||||||
long_description=LONG_DESCRIPTION,
|
long_description=LONG_DESCRIPTION,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type='text/markdown',
|
||||||
url="https://github.com/yt-dlp/yt-dlp",
|
url='https://github.com/yt-dlp/yt-dlp',
|
||||||
packages=packages,
|
packages=packages,
|
||||||
install_requires=REQUIREMENTS,
|
install_requires=REQUIREMENTS,
|
||||||
project_urls={
|
project_urls={
|
||||||
|
@ -87,28 +87,28 @@ def run(self):
|
||||||
#'Funding': 'https://donate.pypi.org',
|
#'Funding': 'https://donate.pypi.org',
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Topic :: Multimedia :: Video",
|
'Topic :: Multimedia :: Video',
|
||||||
"Development Status :: 5 - Production/Stable",
|
'Development Status :: 5 - Production/Stable',
|
||||||
"Environment :: Console",
|
'Environment :: Console',
|
||||||
"Programming Language :: Python",
|
'Programming Language :: Python',
|
||||||
"Programming Language :: Python :: 2",
|
'Programming Language :: Python :: 2',
|
||||||
"Programming Language :: Python :: 2.6",
|
'Programming Language :: Python :: 2.6',
|
||||||
"Programming Language :: Python :: 2.7",
|
'Programming Language :: Python :: 2.7',
|
||||||
"Programming Language :: Python :: 3",
|
'Programming Language :: Python :: 3',
|
||||||
"Programming Language :: Python :: 3.2",
|
'Programming Language :: Python :: 3.2',
|
||||||
"Programming Language :: Python :: 3.3",
|
'Programming Language :: Python :: 3.3',
|
||||||
"Programming Language :: Python :: 3.4",
|
'Programming Language :: Python :: 3.4',
|
||||||
"Programming Language :: Python :: 3.5",
|
'Programming Language :: Python :: 3.5',
|
||||||
"Programming Language :: Python :: 3.6",
|
'Programming Language :: Python :: 3.6',
|
||||||
"Programming Language :: Python :: 3.7",
|
'Programming Language :: Python :: 3.7',
|
||||||
"Programming Language :: Python :: 3.8",
|
'Programming Language :: Python :: 3.8',
|
||||||
"Programming Language :: Python :: Implementation",
|
'Programming Language :: Python :: Implementation',
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
'Programming Language :: Python :: Implementation :: CPython',
|
||||||
"Programming Language :: Python :: Implementation :: IronPython",
|
'Programming Language :: Python :: Implementation :: IronPython',
|
||||||
"Programming Language :: Python :: Implementation :: Jython",
|
'Programming Language :: Python :: Implementation :: Jython',
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
"License :: Public Domain",
|
'License :: Public Domain',
|
||||||
"Operating System :: OS Independent",
|
'Operating System :: OS Independent',
|
||||||
],
|
],
|
||||||
python_requires='>=2.6',
|
python_requires='>=2.6',
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ def calc_sha256sum(path):
|
||||||
return h.hexdigest()
|
return h.hexdigest()
|
||||||
|
|
||||||
if not isinstance(globals().get('__loader__'), zipimporter) and not hasattr(sys, 'frozen'):
|
if not isinstance(globals().get('__loader__'), zipimporter) and not hasattr(sys, 'frozen'):
|
||||||
to_screen('It looks like you installed yt-dlp with a package manager, pip, setup.py or a tarball. Please use that to update.')
|
to_screen('It looks like you installed yt-dlp with a package manager, pip, setup.py or a tarball. Please use that to update')
|
||||||
return
|
return
|
||||||
|
|
||||||
# sys.executable is set to the full pathname of the exe-file for py2exe
|
# sys.executable is set to the full pathname of the exe-file for py2exe
|
||||||
|
@ -66,7 +66,7 @@ def calc_sha256sum(path):
|
||||||
except Exception:
|
except Exception:
|
||||||
if verbose:
|
if verbose:
|
||||||
to_screen(encode_compat_str(traceback.format_exc()))
|
to_screen(encode_compat_str(traceback.format_exc()))
|
||||||
to_screen('ERROR: can\'t obtain versions info. Please try again later.')
|
to_screen('ERROR: can\'t obtain versions info. Please try again later')
|
||||||
to_screen('Visit https://github.com/yt-dlp/yt-dlp/releases/latest')
|
to_screen('Visit https://github.com/yt-dlp/yt-dlp/releases/latest')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ def get_sha256sum(bin_or_exe, version):
|
||||||
echo.Waiting for file handle to be closed ...
|
echo.Waiting for file handle to be closed ...
|
||||||
ping 127.0.0.1 -n 5 -w 1000 > NUL
|
ping 127.0.0.1 -n 5 -w 1000 > NUL
|
||||||
move /Y "%s.new" "%s" > NUL
|
move /Y "%s.new" "%s" > NUL
|
||||||
echo.Updated yt-dlp to version %s.
|
echo.Updated yt-dlp to version %s
|
||||||
)
|
)
|
||||||
@start /b "" cmd /c del "%%~f0"&exit /b
|
@start /b "" cmd /c del "%%~f0"&exit /b
|
||||||
''' % (exe, exe, version_id))
|
''' % (exe, exe, version_id))
|
||||||
|
@ -212,7 +212,7 @@ def get_sha256sum(bin_or_exe, version):
|
||||||
to_screen('ERROR: unable to overwrite current version')
|
to_screen('ERROR: unable to overwrite current version')
|
||||||
return
|
return
|
||||||
|
|
||||||
to_screen('Updated yt-dlp. Restart yt-dlp to use the new version.')
|
to_screen('Updated yt-dlp. Restart yt-dlp to use the new version')
|
||||||
|
|
||||||
|
|
||||||
''' # UNUSED
|
''' # UNUSED
|
||||||
|
|
Loading…
Reference in a new issue