On 26/09/2013 19:14, Bill wrote:
Joel Goldstick wrote:



On Thu, Sep 26, 2013 at 11:13 AM, Bill <b...@bill.com
<mailto:b...@bill.com>> wrote:

    I have been using the script youtube-dl
    http://rg3.github.io/youtube-__dl/ <http://rg3.github.io/youtube-dl/>

    And I was wondering if there is a way to download all of a user's
    favorites or uploads.

    The script has a functionality to download all videos in a txt file.
    So if there is a way using the youtube API or JSON (none of which I
    am familiar with) to bring up a list of all these videos then it'd
    be a simple case putting these urls into a file.

    The problem is youtube displays favorites or user uploads in pages
    or infinite scroll. So it is difficult to access them by the
    BeautifulSoup module.


    What do you suggest?
    --
    https://mail.python.org/__mailman/listinfo/python-list
    <https://mail.python.org/mailman/listinfo/python-list>


Have you looked at the youtube API?  That would be better than screen
scraping. https://developers.google.com/youtube/getting_started


--
Joel Goldstick
http://joelgoldstick.com

I remember looking at this a while ago. These are the relevant sections
of the API:

https://developers.google.com/youtube/2.0/developers_guide_protocol?hl=en#User_Uploaded_Videos

https://developers.google.com/youtube/2.0/developers_guide_protocol?hl=en#Favorite_Videos

The problem with the API is that with both of these, it only brings up
25 videos e.g. https://gdata.youtube.com/feeds/api/users/scooby1961/uploads

Unless I'm missing something? There must be a way to bring up all of
them on one page right? Or at least cycle through the rest of them.

You _are_ missing something. That section of "#User_Uploaded_Videos"
mentions the parameters "start-index" and "max-results".

Same problem with favorties:
https://gdata.youtube.com/feeds/api/users/adambuxton/favorites/


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to