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

Batch download of Favourites #127

Closed
orospakr opened this issue Jul 6, 2011 · 8 comments
Closed

Batch download of Favourites #127

orospakr opened this issue Jul 6, 2011 · 8 comments
Assignees
Labels

Comments

@orospakr
Copy link

orospakr commented Jul 6, 2011

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?

@phihag
Copy link
Contributor

phihag commented 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.

@orschiro
Copy link

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

Regards

@phihag
Copy link
Contributor

phihag commented Oct 20, 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.

@orospakr
Copy link
Author

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

@orschiro
Copy link

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]$

@orospakr
Copy link
Author

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. ;)

@Jimmm
Copy link

Jimmm commented Nov 14, 2012

Your playlist has to be public.

@ghost ghost assigned jaimeMF Jul 24, 2013
@jaimeMF
Copy link
Collaborator

jaimeMF commented 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.

joedborg referenced this issue in joedborg/youtube-dl Nov 17, 2020
[pull] master from rg3:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants