Batch download of Favourites #92

Closed
opened 2026-02-20 21:02:13 -05:00 by deekerman · 8 comments
Owner

Originally created by @orospakr on GitHub (Jul 6, 2011).

Originally assigned to: @jaimeMF on GitHub.

While one can download an entire playlist right now (although I haven't tried a playlist longer than 50 items...), I'm hoping to use youtube-dl to archive my ~800 favourites.

Channel-style (notice that it's specifying the given content to look at with an anchor, and their client-side JS code displays the right thing):
http://www.youtube.com/user/orospakr#g/f

So, if you give youtube-dl that URL, it will actually download the first 50 of your favourites, as well as the first 50 of your uploads, and so on. It appears to be falling back to a naiive scrape of YouTube IDs out of that page, or something. Normally in the browser further content is unhidden using the "Show more" button (bad UI, but there it is).

My Videos-style:
http://youtube.com/my_favorites

It's also paginated, and depends on your session (obviously).

Neither of those is particularly ideal.

Maybe there's nothing for it but to use the YouTube Data API?

Originally created by @orospakr on GitHub (Jul 6, 2011). Originally assigned to: @jaimeMF on GitHub. While one can download an entire playlist right now (although I haven't tried a playlist longer than 50 items...), I'm hoping to use youtube-dl to archive my ~800 favourites. Channel-style (notice that it's specifying the given content to look at with an anchor, and their client-side JS code displays the right thing): http://www.youtube.com/user/orospakr#g/f So, if you give youtube-dl that URL, it will actually download the first 50 of your favourites, as well as the first 50 of your uploads, and so on. It appears to be falling back to a naiive scrape of YouTube IDs out of that page, or something. Normally in the browser further content is unhidden using the "Show more" button (bad UI, but there it is). My Videos-style: http://youtube.com/my_favorites It's also paginated, and depends on your session (obviously). Neither of those is particularly ideal. Maybe there's nothing for it but to use the YouTube Data API?
deekerman 2026-02-20 21:02:13 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@phihag commented on GitHub (Jul 7, 2011):

The Youtube Data API does not return the full favorite list either: https://gdata.youtube.com/feeds/api/users/orospakr/favorites has just 22 entries.

@phihag commented on GitHub (Jul 7, 2011): The Youtube Data API does not return the full favorite list either: https://gdata.youtube.com/feeds/api/users/orospakr/favorites has just 22 entries.
Author
Owner

@orschiro commented on GitHub (Oct 18, 2011):

Are there any new updates or is there still no chance to fetch the favourites of a user?

Regards

@orschiro commented on GitHub (Oct 18, 2011): Are there any new updates or is there still no chance to fetch the favourites of a user? Regards
Author
Owner

@phihag commented on GitHub (Oct 19, 2011):

There is a chance, that's why this bug is still open. However, someone needs to implement this, and since it's not a high-priority issue for me personally, and I don't have a lot of time, it may take a while for me to do it.

On a closer look, this doesn't seem overly complicated. We need to send requests to http://www.youtube.com/profile_ajax?action_ajax=1&user=orospakr&new=1&box_method=load_playlist_page&box_name=user_playlist_navigator with the following form data (decoded here, with successive page_num values, here 2):

session_token:HiOe4wTX6YPdditqqllSX1Nx0TF8MEAxMzE5MDY5NzQ5

messages:[{"type":"box_method","request":{"name":"user_playlist_navigator","x_position":1,"y_position":-2,"palette":"default","method":"load_playlist_page","params":{"playlist_name":"favorites","encrypted_playlist_id":"favorites","query":"","encrypted_shmoovie_id":"favorites","page_num":2,"view":"grid","playlist_sort":"date","playlist_sort_direction":"desc"}}}]

I'll see what I can do this weekend, but I'm not making any promises.

@phihag commented on GitHub (Oct 19, 2011): There is a chance, that's why this bug is still open. However, someone needs to implement this, and since it's not a high-priority issue for me personally, and I don't have a lot of time, it may take a while for me to do it. On a closer look, this doesn't seem overly complicated. We need to send requests to `http://www.youtube.com/profile_ajax?action_ajax=1&user=orospakr&new=1&box_method=load_playlist_page&box_name=user_playlist_navigator` with the following form data (decoded here, with successive `page_num` values, here 2): ``` session_token:HiOe4wTX6YPdditqqllSX1Nx0TF8MEAxMzE5MDY5NzQ5 messages:[{"type":"box_method","request":{"name":"user_playlist_navigator","x_position":1,"y_position":-2,"palette":"default","method":"load_playlist_page","params":{"playlist_name":"favorites","encrypted_playlist_id":"favorites","query":"","encrypted_shmoovie_id":"favorites","page_num":2,"view":"grid","playlist_sort":"date","playlist_sort_direction":"desc"}}}] ``` I'll see what I can do this weekend, but I'm not making any promises.
Author
Owner

@orospakr commented on GitHub (Oct 22, 2011):

So, today, I made a discovery. Unlike the "Channels" view, if you get to your favourites by clicking on your name in the top right corner and clicking on "Favorites" in the pop down, you'll get an URL that looks like this, which actually displays your favourites as a playlist:

http://www.youtube.com/playlist?list=FLXFUoBbw37pkeDg3NkxOaCw

youtube-dl consumes this just fine and recognizes it as a Playlist, and seems to detect and fetch all of the pages of it. I have it downloading my entire favourites now. :D

@orospakr commented on GitHub (Oct 22, 2011): So, today, I made a discovery. Unlike the "Channels" view, if you get to your favourites by clicking on your name in the top right corner and clicking on "Favorites" in the pop down, you'll get an URL that looks like this, which actually displays your favourites as a _playlist_: http://www.youtube.com/playlist?list=FLXFUoBbw37pkeDg3NkxOaCw youtube-dl consumes this just fine and recognizes it as a Playlist, and seems to detect and fetch _all_ of the pages of it. I have it downloading my entire favourites now. :D
Author
Owner

@orschiro commented on GitHub (Jan 15, 2012):

That is interesting.

I tried exactly the same and I get no results at all.

[/media/personal/YouTube Favourites]$ youtube-dl "http://www.youtube.com/playlist?list=FLVnIUe_Lp4nVYG4eeBRt8Jg&feature=mh_lolz"
[youtube] Setting language
[youtube] PL FLVnIUe: Downloading page #1
[/media/personal/YouTube Favourites]$

@orschiro commented on GitHub (Jan 15, 2012): That is interesting. I tried exactly the same and I get no results at all. [/media/personal/YouTube Favourites]$ youtube-dl "http://www.youtube.com/playlist?list=FLVnIUe_Lp4nVYG4eeBRt8Jg&feature=mh_lolz" [youtube] Setting language [youtube] PL FLVnIUe: Downloading page #1 [/media/personal/YouTube Favourites]$
Author
Owner

@orospakr commented on GitHub (Jan 16, 2012):

Try removing the feature= parameter? (I can't try it again right now)

Also, always make sure that your youtube-dl tree is up to date. Moving targets and all. ;)

@orospakr commented on GitHub (Jan 16, 2012): Try removing the feature= parameter? (I can't try it again right now) Also, always make sure that your youtube-dl tree is up to date. Moving targets and all. ;)
Author
Owner

@Jimmm commented on GitHub (Nov 14, 2012):

Your playlist has to be public.

@Jimmm commented on GitHub (Nov 14, 2012): Your playlist has to be public.
Author
Owner

@jaimeMF commented on GitHub (Jul 24, 2013):

Added support, they can be downloaded using youtube-dl :ytfav --netrc

It will only work for your own favourites, If someone is interested in downloading from someone else account, some syntax have to be proposed or give a link to the favourite list (http://www.youtube.com/user/orospakr#g/f doesn't point to the favourites)

@orospakr your favourite list is so big that it reaches the max number of results the gdata api can give ;), so some videos can't be downloaded.

@jaimeMF commented on GitHub (Jul 24, 2013): Added support, they can be downloaded using `youtube-dl :ytfav --netrc` It will only work for your own favourites, If someone is interested in downloading from someone else account, some syntax have to be proposed or give a link to the favourite list (http://www.youtube.com/user/orospakr#g/f doesn't point to the favourites) @orospakr your favourite list is so big that it reaches the max number of results the gdata api can give ;), so some videos can't be downloaded.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#92
No description provided.