longpdo / youtube-dl-watch-later-playlist

Python script to download all YouTube videos from your Watch Later Playlist automatically.
MIT License
60 stars 38 forks source link

You will only be able to load 100 entries max. #1

Open e-d-n-a opened 3 years ago

e-d-n-a commented 3 years ago

In the function scrape_watch_later_playlist you only extract the links from the initial page request, but playlists containing >100 entries need further requests (continuations) to load more entries in 100-entry packets via 1 of the 2 JSON-APIs.

I'm not sure, if you're aware of that, as this actually limits the use of this tool substantially.

You can see in the source code of "youtube-dl", how they deal with the continuations, although it's a bit convoluted there.

You could try to get the youtube-session-cookies from your Chromedriver-instance and use it with youtube-dl, as it is perfectly capable of extracting complete youtube-playlists incl. the watchlater-playlist. It only seems to have an issue with the Google-login atm, but still works when providing a netscape-cookie-file for the youtube-domain from a logged-in browser-session, where javascript execution has been halted.

longpdo commented 3 years ago

Ok, thanks for the information. I did not think of playlists with more than 100 entries.

irate-overlord commented 3 years ago

My Watch Later list has 2300 entries, which I believe is the max (I'm only guessing this because it will still let me click to add new videos, but they do not appear on the WL). Just to give you an idea of how big they can get.

Aman-1412 commented 3 years ago

My Watch Later list has 2300 entries, which I believe is the max

3900 here. I read somewhere that the limit is 5000. I need to get my youtube life sorted out.. Getting rid of that procrastination seems to be a good start.

SingeStheos commented 1 year ago

is there no solution? i have 128 videos. this is terribly unlucky for me.

marcozeller commented 1 year ago

is there no solution? i have 128 videos. this is terribly unlucky for me.

In case you are still looking for a solution. I played a bit with the script and had to make some adjustments for it to run. Guess youtube has updated its page-layout and bot-detection.

I also found a simple workaround to the 100 videos limitation. Please check it out here: https://github.com/marcozeller/youtube-dl-watch-later-playlist/tree/fix-issues

Maybe it can be merged to this repository at some point.