Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube-dl python module fails with external downloader set. #9278

Closed
fluver opened this issue Apr 22, 2016 · 1 comment
Closed

youtube-dl python module fails with external downloader set. #9278

fluver opened this issue Apr 22, 2016 · 1 comment

Comments

@fluver
Copy link

@fluver fluver commented Apr 22, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.04.19
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

>>> import youtube_dl

>>> ydl = youtube_dl.YoutubeDL({'outtmpl': '/tmp/%(id)s', 'quiet': False, 'verbose': True,'restrictfilenames': True, 'ignoreerrors': True, 'external_downloader': 'axel', 'external_downloader_args': "-n50"}) #dosnt work
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.19
[debug] Python version 3.4.2 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.4
[debug] exe versions: none
[debug] Proxy map: {}
>>> with ydl:
...     result = ydl.extract_info(
...         'https://www.youtube.com/watch?v=pV8PQ9NH2zo',
...         download=True 
...     )
...
[youtube] pV8PQ9NH2zo: Downloading webpage
[youtube] pV8PQ9NH2zo: Downloading video info webpage
[youtube] pV8PQ9NH2zo: Extracting video information
[youtube] pV8PQ9NH2zo: Downloading MPD manifest
[debug] Invoking downloader on 'https://r11---sn-25ge7n7d.googlevideo.com/videoplayback?ratebypass=yes&itag=22&cnr=14&mime=video%2Fmp4&initcwndbps=7122500&ipbits=0&mt=1461342844&fexp=9407190%2C9408214%2C9416126%2C9416891%2C9419452%2C9420095%2C9422596%2C9424134%2C9426926%2C9428398%2C9431012%2C9432683%2C9433096%2C9433118%2C9433191%2C9433626%2C9433947%2C9434075%2C9434769%2C9435039&key=yt6&upn=OeuoyuiF4Wo&expire=1461364559&sparams=cnr%2Cdur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cusequic%2Cexpire&ms=au&source=youtube&mv=m&dur=196.673&pl=24&ip=62.210.81.222&lmt=1461338298247924&usequic=no&id=o-ADfemKiqADhwAwl1nR5IZTpJJkmnrRC-T01qiOTwEYkY&mm=31&mn=sn-25ge7n7d&nh=IgpwcjAxLnBhcjAxKgkxMjcuMC4wLjE&sver=3&signature=0F7E86DA0A4D3D86ACC997BCFF26A483824130DE.172268C46CA7F00291FB219664A60A56597BD88B&requiressl=yes'
[download] Destination: /tmp/pV8PQ9NH2zo
ERROR:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 682, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 727, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 1376, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 1638, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 1580, in dl
    return fd.download(name, info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/downloader/external.py", line 27, in real_download
    retval = self._call_downloader(tmpfilename, info_dict)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/downloader/external.py", line 79, in _call_downloader
    cmd = [encodeArgument(a) for a in self._make_cmd(tmpfilename, info_dict)]
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/downloader/external.py", line 113, in _make_cmd
    cmd += self._configuration_args()
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/downloader/external.py", line 75, in _configuration_args
    return cli_configuration_args(self.params, 'external_downloader_args', default)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/utils.py", line 2209, in cli_configuration_args
    assert isinstance(ex_args, list)
AssertionError

Description of your issue, suggested solution and other information

When using youtube-dl as a python module with an external downloader download fails.
OS: Debian Jessie(up-to date)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 22, 2016

It should be a list. FYI, the following codes show how youtube-dl transform command line arguments into a list:

    external_downloader_args = None
    if opts.external_downloader_args:
        external_downloader_args = compat_shlex_split(opts.external_downloader_args)

From: https://github.com/rg3/youtube-dl/blob/52bb437/youtube_dl/__init__.py#L269-L271

@yan12125 yan12125 closed this Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.