Browse Source

Move code into a separate Python module

rtmp_test
Philipp Hagemeister 13 years ago
parent
commit
235b3ba479
4 changed files with 4237 additions and 7 deletions
  1. +4
    -3
      Makefile
  2. +6
    -4
      youtube-dl
  3. +6
    -0
      youtube-dl.dev
  4. +4221
    -0
      youtube_dl/__init__.py

+ 4
- 3
Makefile View File

@ -1,6 +1,6 @@
default: update
update: update-readme update-latest
update: compile update-readme update-latest
update-latest:
./youtube-dl --version > LATEST_VERSION
@ -15,6 +15,7 @@ update-readme:
echo -e '\n## FAQ' >> README.md && \
echo "$${footer}" >> README.md
compile:
cp youtube_dl/__init__.py youtube-dl
.PHONY: default update update-latest update-readme
.PHONY: default compile update update-latest update-readme

+ 6
- 4
youtube-dl View File

@ -4045,7 +4045,7 @@ def gen_extractors():
GenericIE()
]
def main():
def _real_main():
parser, opts, args = parseOpts()
# Open appropriate CookieJar
@ -4205,10 +4205,9 @@ def main():
sys.exit(retcode)
if __name__ == '__main__':
def main():
try:
main()
_real_main()
except DownloadError:
sys.exit(1)
except SameFileError:
@ -4216,4 +4215,7 @@ if __name__ == '__main__':
except KeyboardInterrupt:
sys.exit(u'\nERROR: Interrupted by user')
if __name__ == '__main__':
main()
# vim: set ts=4 sw=4 sts=4 noet ai si filetype=python:

+ 6
- 0
youtube-dl.dev View File

@ -0,0 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import youtube_dl
youtube_dl.main()

+ 4221
- 0
youtube_dl/__init__.py
File diff suppressed because it is too large
View File


Loading…
Cancel
Save