b5i / YouTubeKit

A way to interact with YouTube's API in Swift (without any API key!)
https://swiftpackageindex.com/b5i/YouTubeKit
MIT License
81 stars 8 forks source link

[BUG] - Some methods are returning "400 – Request contains an invalid argument" #28

Open jtbergman opened 1 month ago

jtbergman commented 1 month ago

Describe the bug Hi, thanks for the project. I noticed that some methods are returning "400 – Requests contains an invalid argument". I tried both the framework in my own app and within the Atwy app. The two requests I've seen returning this so far are SearchResponse and PlaylistInfosResponse

To Reproduce This is reproducible on the home tan of Atwy and within the test code for playlists:

let playlist = YTPlaylist(playlistId: "VLPLw-VjHDlEOgs658kAHR_LAaILBXb-s6Q5")
let response = try await playlist.fetchVideosThrowing(youtubeModel: model)

I tried these both with and without cookies set.

Expected behavior Perhaps the requests need to be updated, I expect them to not 404.

Additional context Add any other context about the problem here.

image
b5i commented 1 month ago

Hello! Thanks for your detailed bug report. Unfortunately, I can’t reproduce the bug on my side. I realized there was a bug in the playlists extraction and it’s now fixed (in YouTubeKit and Atwy), that might have been the cause of the issue in your case, but it shouldn’t return a 404/400 error. To debug I’d need you to activate the logger in Atwy’s settings. Then reproduce the bugs and upload every concerned log (zip) in this channel so I can try to understand what the problem was. Also, could you try to

Thank you