[Python] Efficient asynchronous method to retrieve all videos from a YouTube channel

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I need to retrieve all videos from a YouTube channel asynchronously. Libraries like yt-dlp and pytube are no longer maintained. I also tried using scrapetube, but it's too slow (I attempted to call its methods asynchronously, but that didn't improve performance).

    While the standard YouTube Data API works with aiohttp, it’s not ideal. I can only fetch videos using the /search endpoint, which returns a maximum of 50 videos per page. Although I can paginate through the results with nextPageToken, this feels more like a workaround rather than an efficient solution.

    Can anyone recommend a good API or library that supports asynchronous operations and allows fetching all videos from a YouTube channel efficiently?

    Continue reading...

Compartilhe esta Página