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

GetVideosAsync does not return all videos of a playlist #749

Open
4 of 5 tasks
fiso64 opened this issue Nov 4, 2023 · 1 comment · May be fixed by #821
Open
4 of 5 tasks

GetVideosAsync does not return all videos of a playlist #749

fiso64 opened this issue Nov 4, 2023 · 1 comment · May be fixed by #821

Comments

@fiso64
Copy link

fiso64 commented Nov 4, 2023

Version

v6.3.6

Platform

.NET 6.0 / Windows 10

Steps to reproduce

youtube.Playlists.GetVideosAsync("https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX")

Details

GetVideosAsync only returns the first ~900 videos from https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX. The official api returns ~4500 videos of which about 500 are duplicates.

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that that this bug is reproducible on the latest version of the package
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
@hunterlan
Copy link

hunterlan commented Sep 30, 2024

I did a little research for this issue:
At the moment of creating this comment, there were 4636 videos in playlist, according to YouTube.
Service TuneMyMusic exported to CSV file 4531 videos (so on this step we have 105 videos removed, probably due to removed or privated videos).
If we remove duplicates in Excel, there are 4074 unique videos.

Also, when I commented 109 and 110 lines in PlaylistClient.cs I ran into situation that code can reach to the last item of playlist, but after that it repeats fetching last videos from playlist endless. In addition to that, the value of lastVideoIndex was 4448 and it confuses me🫠

Here's .csv (original) and .xlsx (changed) files with content of playlist.
Youtube_Explode_Test_Playlist.csv
Youtube_Explode_Test_Playlist.xlsx

I hope it can be useful for anyone who will try to fix it.

UPD: I made minor changes that allowed me to rise number of items from function up to 3994. Some videos (example 1) are not available due to copyrights. I guess it's the best we can do right now.

hunterlan added a commit to hunterlan/YoutubeExplode that referenced this issue Sep 30, 2024
Added additional variable, which will not contain videos, that were already added.
@hunterlan hunterlan linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants