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

noplaylist doesn't work as Python Method #4309

Closed
capital-G opened this issue Nov 25, 2014 · 4 comments
Closed

noplaylist doesn't work as Python Method #4309

capital-G opened this issue Nov 25, 2014 · 4 comments

Comments

@capital-G
Copy link
Contributor

@capital-G capital-G commented Nov 25, 2014

Hi there,
I currently use YTDL in a python project of mine and it seems I found a bug in it:
If i create a new YTDL method like
ydl = youtube_dl.YoutubeDL(params={'noplaylist':True,})
It still downloads Playlists, because it goes this way
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L657-L663
and not this way:
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L1161

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 25, 2014

It seems to work fine:

import youtube_dl

ydl = youtube_dl.YoutubeDL(params={
    'noplaylist':True,
    'outtmpl': 'example/%(id)s',
})

ydl.download(['https://www.youtube.com/watch?v=bV9L5Ht9LgY&index=1&list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re'])

Will just download bV9L5Ht9LgY:

$ python3 sample.py
[youtube:playlist] Downloading just video bV9L5Ht9LgY because of --no-playlist
[youtube] Confirming age
[youtube] bV9L5Ht9LgY: Downloading webpage
[youtube] bV9L5Ht9LgY: Downloading video info webpage
[youtube] bV9L5Ht9LgY: Extracting video information
[youtube] bV9L5Ht9LgY: Downloading DASH manifest
[download] Destination: example/bV9L5Ht9LgY
[download]   0.7% of 37.26MiB at 481.74KiB/s ETA 01:18

Could you give more info? Like youtube_dl version, url that shows the problem, the code that you use...

@capital-G
Copy link
Contributor Author

@capital-G capital-G commented Nov 25, 2014

You're right, with your URL it worked, but it doesn't work with this one: https://www.youtube.com/playlist?list=PLEB7907E8F277754A

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 25, 2014

That's normal, the url doesn't contain any video id, so there's no doubt that it's a playlist url (see the option description). Note that youtube-dl 'https://www.youtube.com/playlist?list=PLEB7907E8F277754A' --no-playlist will download all the videos.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 26, 2014

Maybe we should rename no_playlist? I have updated the documentation to clarify.

@capital-G If you want youtube-dl to bail if it detects a playlist, please open a new issue. Don't forget to provide us with lots of context, without which any request is likely to be lingering or even be closed outright.

@phihag phihag closed this in acda92f Nov 26, 2014
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
3 participants
You can’t perform that action at this time.