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 --flat-playlist extractor on filters=playlist search url results in video id instead of playlist id #25652

Closed
Crypto90 opened this issue Jun 13, 2020 · 4 comments
Labels

Comments

@Crypto90
Copy link

@Crypto90 Crypto90 commented Jun 13, 2020

Checklist

  • [ X ] I'm reporting a broken site support issue
  • [ X ] I've verified that I'm running youtube-dl version 2020.06.06
  • [ X ] I've checked that all provided URLs are alive and playable in a browser
  • [ X ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ X ] I've searched the bugtracker for similar bug reports including closed ones
  • [ X ] I've read bugs section in FAQ

Verbose log

python youtube-dl -v -4 --default-search ytsearch1 "https://www.youtube.com/results?search_query=nightcore&filters=playlist&lclk=video" --dump-single-json --playlist-start 1 --playlist-end 1 --flat-playlist
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-4', u'--default-search', u'ytsearch1', u'https://www.youtube.com/results?search_query=nightcore&filters=playlist&lclk=video', u'--dump-single-json', u'--playlist-start', u'1', u'--playlist-end', u'1', u'--flat-playlist']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.06
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-9-amd64-x86_64-with-debian-9.9
[debug] exe versions: ffmpeg 4.0, ffprobe 4.0
[debug] Proxy map: {}
{"extractor": "youtube:search_url", "_type": "playlist", "title": "nightcore", "extractor_key": "YoutubeSearchURL", "webpage_url": "https://www.youtube.com/results?search_query=nightcore&filters=playlist&lclk=video", "entries": [{"url": "cvaIgq5j2Q8", "_type": "url", "ie_key": "Youtube", "id": "cvaIgq5j2Q8", "title": "Most Viewed Nightcore"}], "webpage_url_basename": "results"}

Description

Searched for https://www.youtube.com/results?search_query=nightcore&filters=playlist&lclk=video
with --default-search ytsearch1 --dump-single-json --playlist-start 1 --playlist-end 1 --flat-playlist

As we get playlist only results listed from youtube, we need to get the playlist id instead of the first video id inside the playlist.
So we have to make sure if the resulted id/url contains &list=XXXXXXXXXXXXXXXXXXX and add the list id as result id instead of the video id. Otherwise its not possible to get the correct playlist id/url.

Result from youtube.com:
https://www.youtube.com/watch?v=cvaIgq5j2Q8&list=PL0wqt_um4x0bsdViTJBmnl6KGMoSqxfZy

We need the playlist id "PL0wqt_um4x0bsdViTJBmnl6KGMoSqxfZy" but youtube-dl results the video id "cvaIgq5j2Q8" which is wrong.

@dstftw dstftw closed this Jun 13, 2020
@dstftw dstftw added the incomplete label Jun 13, 2020
@Crypto90
Copy link
Author

@Crypto90 Crypto90 commented Jun 13, 2020

How is this unclear?

Wrong:
{"url": "cvaIgq5j2Q8", "_type": "url", "ie_key": "Youtube", "id": "cvaIgq5j2Q8", "title": "Most Viewed Nightcore"}], "webpage_url_basename": "results"}

Right:
{"url": "PL0wqt_um4x0bsdViTJBmnl6KGMoSqxfZy", "_type": "url", "ie_key": "Youtube", "id": "PL0wqt_um4x0bsdViTJBmnl6KGMoSqxfZy", "title": "Most Viewed Nightcore"}], "webpage_url_basename": "results"}

@Crypto90
Copy link
Author

@Crypto90 Crypto90 commented Jun 13, 2020

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 13, 2020

Duplicate of #16627.

@ytdl-org ytdl-org locked and limited conversation to collaborators Jun 13, 2020
@dstftw dstftw added duplicate and removed incomplete labels Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.