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

unable to stop it from downloading playlist or more pages. #6754

Closed
nadermx opened this issue Sep 3, 2015 · 3 comments
Closed

unable to stop it from downloading playlist or more pages. #6754

nadermx opened this issue Sep 3, 2015 · 3 comments

Comments

@nadermx
Copy link

@nadermx nadermx commented Sep 3, 2015

I am trying to make it so if a url inserted it only downloads the webpage for that url. And does not continue downloading the video's or playlist.

This is what I have so far

                ydl_opts = {
                    'list_thumbnails:': True,
                    'no-playlist': True,
                    'youtube_include_dash_manifest': False,
                    'logger': MyLogger(),
                    'progress_hooks': [my_hook],
                }
                with youtube_dl.YoutubeDL(ydl_opts) as ydl:
                    video = ydl.extract_info(url,  download=False)

But for some reason it still tries for the playlist, and continues with the channel or user.

02:25:06 high: worker.extract_thumb(u'http://www.youtube.com/user/Funnycatsandnicefish') (653367d9-5574-4760-ba2f-c20e96860d9b)
[youtube:user] Funnycatsandnicefish: Downloading channel page
[youtube:playlist] UUERQZLRMniqsMlgBxme32cQ: Downloading webpage
[download] Downloading playlist: Uploads from Funnycatsandnicefish
[youtube:playlist] UUERQZLRMniqsMlgBxme32cQ: Downloading page #1
[youtube:playlist] UUERQZLRMniqsMlgBxme32cQ: Downloading page #2
[youtube:playlist] playlist Uploads from Funnycatsandnicefish: Downloading 293 videos
[download] Downloading video 1 of 293
[youtube] _yzClcFwlO0: Downloading webpage
[youtube] _yzClcFwlO0: Extracting video information

Any help would be appreciated

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 3, 2015

It's noplaylist not no-playlist. But the only thing that options does is that if the url also contains a video (like https://www.youtube.com/watch?v=FXxLjLQi3Fg&list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re) it forces the download of the video instead of the full playlist.

Could explain with more detail why do you need that feature and how it should work?

@nadermx
Copy link
Author

@nadermx nadermx commented Sep 3, 2015

I think it would be beneficial to the community when parsing a url with youtube-dl, it can cause for a worker to go far longer than necessary once the data needed has already been extracted.

And one could argue that the top video in the user directory is most likely the video they want to be associated with

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 4, 2015

think it would be beneficial to the community when parsing a url with youtube-dl, it can cause for a worker to go far longer than necessary once the data needed has already been extracted.

If you only want to get the first video all you need to do is use 'playlistend': 1.

And one could argue that the top video in the user directory is most likely the video they want to be associated with

That's problematic: some may want the most recent video (from http://www.youtube.com/user/Funnycatsandnicefish/videos) while others would prefer the video featured in the user page.

Since I think that solves your problem, I'm closing the issue.

@jaimeMF jaimeMF closed this Sep 4, 2015
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.