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

playlists not recognised/only first item found #17361

Closed
Cokemonkey11 opened this issue Aug 27, 2018 · 13 comments
Closed

playlists not recognised/only first item found #17361

Cokemonkey11 opened this issue Aug 27, 2018 · 13 comments
Labels

Comments

@Cokemonkey11
Copy link

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

  • I've verified and I assure that I'm running youtube-dl 2018.08.22

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • 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
youtube-dl ytsearch:OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'ytsearch:OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM', u'-v', u'-i', u'-f', u'm4a', u'--restrict-filenames', u'--no-mtime', u'-o', u'%(epoch)s.%(id)s.%(title).40s.%(ext)s']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.22
[debug] Python version 2.7.9 (CPython) - Linux-4.4.38-v7+-armv7l-with-debian-8.0
[debug] exe versions: avconv 3.2.10-1, avprobe 3.2.10-1, ffmpeg 3.2.10-1, ffprobe 3.2.10-1
[debug] Proxy map: {}
[youtube:search] query "OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM": Downloading page 1
[download] Downloading playlist: OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM
[youtube:search] playlist OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] ZcarAijzGn4: Downloading webpage
[youtube] ZcarAijzGn4: Downloading video info webpage
[youtube] {22} signature length 41.41, html5 player vflvPJ1R-
[youtube] {43} signature length 41.41, html5 player vflvPJ1R-
[youtube] {18} signature length 41.41, html5 player vflvPJ1R-
[youtube] {36} signature length 41.41, html5 player vflvPJ1R-
[youtube] {17} signature length 41.41, html5 player vflvPJ1R-
[youtube] {137} signature length 41.41, html5 player vflvPJ1R-
[youtube] {248} signature length 41.41, html5 player vflvPJ1R-
[youtube] {136} signature length 41.41, html5 player vflvPJ1R-
[youtube] {247} signature length 41.41, html5 player vflvPJ1R-
[youtube] {135} signature length 41.41, html5 player vflvPJ1R-
[youtube] {244} signature length 41.41, html5 player vflvPJ1R-
[youtube] {134} signature length 41.41, html5 player vflvPJ1R-
[youtube] {243} signature length 41.41, html5 player vflvPJ1R-
[youtube] {133} signature length 41.41, html5 player vflvPJ1R-
[youtube] {242} signature length 41.41, html5 player vflvPJ1R-
[youtube] {160} signature length 41.41, html5 player vflvPJ1R-
[youtube] {278} signature length 41.41, html5 player vflvPJ1R-
[youtube] {140} signature length 41.41, html5 player vflvPJ1R-
[youtube] {171} signature length 41.41, html5 player vflvPJ1R-
[youtube] {249} signature length 41.41, html5 player vflvPJ1R-
[youtube] {250} signature length 41.41, html5 player vflvPJ1R-
[youtube] {251} signature length 41.41, html5 player vflvPJ1R-
[debug] Invoking downloader on u'https://r2---sn-cn3tc-ajty.googlevideo.com/videoplayback?ei=aiSEW7S2J5OfhAfQ44mYDw&dur=494.608&gcr=gb&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2$lmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&requiressl=yes&mt=1535386654&mv=m&pl=39&id=o-AFrJTUPNkOKzn6_0ILLMrvvC8fcK7AThB4jJyLLopZk6&ms=au%2Crdu&ip=2a02%3Ac7d%3Ab388%3A5d00%3A2cdd%3A5c05%3Aea35%3Aa20d$key=yt6&keepalive=yes&mm=31%2C29&mn=sn-cn3tc-ajty%2Csn-aigzrn7k&c=WEB&source=youtube&clen=7856253&gir=yes&initcwndbps=698750&ipbits=0&lmt=1521632214550986&fvip=2&expire=1535408330&mime=audio%2Fmp4&itag=140&signature=D75F54BE$7844F7B9F714CAF543C3E4C613EA9C8.8538F6B9D37AB8B5B61790AEEA14B994970DE6A2&ratebypass=yes'
[download] Destination: 1535386732.ZcarAijzGn4.Hajnali_Csillag.m4a
[download] 100% of 7.49MiB in 00:05
[ffmpeg] Correcting container in "1535386732.ZcarAijzGn4.Hajnali_Csillag.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:1535386732.ZcarAijzGn4.Hajnali_Csillag.m4a' -c copy -f mp4 'file:1535386732.ZcarAijzGn4.Hajnali_Csillag.temp.m4a'
[download] Finished downloading playlist: OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM

Expected behavior: 11 songs are fetched
Actual behavior: 1 song is fetched

This used to work fine.

I've tested without the ytsearch and with/without quotes around the playlist argument, but no luck.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

> py -3.6 .\youtube_dl\__main__.py https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM -F
[youtube:playlist] OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM: Downloading webpage
[download] Downloading playlist: Geometria
[youtube:playlist] playlist Geometria: Downloading 11 videos
[download] Downloading video 1 of 11
[youtube] ZcarAijzGn4: Downloading webpage
[youtube] ZcarAijzGn4: Downloading video info webpage
[youtube] ZcarAijzGn4: Downloading js player vflvPJ1R-

ERROR: Interrupted by user
@dstftw dstftw closed this Aug 27, 2018
@dstftw dstftw added the invalid label Aug 27, 2018
@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

If I copy your arguments I also get 11:

youtube-dl https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM -F
[youtube:playlist] OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM: Downloading webpage
[download] Downloading playlist: Geometria
[youtube:playlist] playlist Geometria: Downloading 11 videos
[download] Downloading video 1 of 11

But this bug report doesn't specify the same arguments as you. It specifies these:

youtube-dl 'ytsearch:https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM' -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'ytsearch:https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM', u'-v', u'-i', u'-f', u'm4a', u'--restrict-filenames', u'--no-mtime', u'-o', u'%(epoch)s.%(id)s.%(title).
40s.%(ext)s']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.22
[debug] Python version 2.7.9 (CPython) - Linux-4.4.38-v7+-armv7l-with-debian-8.0
[debug] exe versions: avconv 3.2.10-1, avprobe 3.2.10-1, ffmpeg 3.2.10-1, ffprobe 3.2.10-1
[debug] Proxy map: {}
[youtube:search] query "https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM": Downloading page 1
[download] Downloading playlist: https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM
[youtube:search] playlist https://www.youtube.com/playlist?list=OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] S_hfAgpINhA: Downloading webpage
[youtube] S_hfAgpINhA: Downloading video info webpage
[debug] Invoking downloader on u'https://r2---sn-cn3tc-ajtd.googlevideo.com/videoplayback?source=youtube&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%
2Crequiressl%2Csource%2Cexpire&requiressl=yes&fvip=2&clen=308938&gir=yes&dur=19.411&lmt=1535152577784373&txp=5432332&key=yt6&mime=audio%2Fmp4&ei=giuEW8eoOIqvxgLG2LqgCA&c=WEB&expire=1535410147&signature=7F965327E501E57EA9F375A
86761A27BFB049194.1A89309F9C4CB8385E7951219BCB28BE1FAAD6F7&initcwndbps=708750&mn=sn-cn3tc-ajtd%2Csn-aigl6n7z&itag=140&mm=31%2C29&ip=2a02%3Ac7d%3Ab388%3A5d00%3A2cdd%3A5c05%3Aea35%3Aa20d&ipbits=0&id=o-ALMpXdMjqHMfyNXkbLtpuUkRSA
mTBWtAK5_JDUO3zrNN&pl=39&keepalive=yes&ms=au%2Crdu&mv=m&mt=1535388473&ratebypass=yes'
[download] Destination: 1535388548.S_hfAgpINhA.payday_2_hidden_camera.m4a

What's going on here? I get something completely unrelated with the above ^

It seems to me that something is broken during some step between command argument parsing and url request.

Can you please comment?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

You're using ytsearch extractor that is a search request with single result. Nothing to do with regular playlists.

@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

Thanks.

What extractor should I use for a youtube-playlist?

Is there a "smart" extractor that tries playlist and then tries ytsearch?

This definitely used to be possible. Not sure if it's a regression or an intentional design change.

At the moment I think I can write a script that tries to prepend ?list= and if that fails, tries ?v=, but that's not as elegant as what previously worked.

Thanks again

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

You should not use any meta extractor for a playlist, don't prefix the URL with ytsearch. Also no changes were made in these mechanisms for years.
What are you even trying to achieve?

@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

I'm exposing an API that allows people on my local network to provide youtube hash that gets downloaded. It's just a bash script. I want this to select the correct extractor between playlist and video variants automatically.

But for the playlist mentioned above, the playlist code on its own only downloads one video. It seems that finding all 11 videos only works when the whole URL is provided.

./scripts/insert.sh OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM
+ '[' -z OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM ']'
+ ret=0
+ youtube-dl OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM -v -i -f m4a --restrict-filenames --no-mtime -o '%(epoch)s.%(id)s.%(title).40s.%(ext)s' --default-search ytsearch
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM', u'-v', u'-i', u'-f', u'm4a', u'--restrict-filenames', u'--no-mtime', u'-o', u'%(epoch)s.%(id)s.%(title).40s.%(ext)s', u'--default-search', u'ytsearch']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.22
[debug] Python version 2.7.9 (CPython) - Linux-4.4.38-v7+-armv7l-with-debian-8.0
[debug] exe versions: avconv 3.2.10-1, avprobe 3.2.10-1, ffmpeg 3.2.10-1, ffprobe 3.2.10-1
[debug] Proxy map: {}
[youtube:search] query "OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM": Downloading page 1                                                                                                                                           [download] Downloading playlist: OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM
[youtube:search] playlist OLAK5uy_m4xAFdmMC5rX3Ji3g93pQe3hqLZw_9LhM: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1

So TLDR:

  • I want to download either playlist or single video automatically
  • only the hash is provided (not full youtube URI)
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

OLAK5uy_ seems to be some new prefix for music album playlists on youtube that is not recognized yet.

@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

So a real bug, finally? :)

Thanks, I will await the next version for now then.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

Not a bug rather a new functionality introduced on youtube's end.

dstftw added a commit that referenced this issue Aug 27, 2018
…efix) (closes #17361)
@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

Fair enough. I would be happy to contribute a change needed if you'd like to mentor me.

I imagine this is a fairly simple addition

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

Already did.

@Cokemonkey11
Copy link
Author

@Cokemonkey11 Cokemonkey11 commented Aug 27, 2018

Looks good - thanks!

I guess this will show up in the next nightly build - i.e. I can upgrade tomorrow?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 27, 2018

There are no nightly builds but release is on the way.

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.