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

cannot parse JSON #3

Open
DeadNumbers opened this issue Sep 21, 2020 · 2 comments
Open

cannot parse JSON #3

DeadNumbers opened this issue Sep 21, 2020 · 2 comments

Comments

@DeadNumbers
Copy link

panic: got malformed json searching for page 0 of query "animus vox": cannot parse JSON: cannot parse empty string; unparsed tail: ""

@LordRusk
Copy link

I got the same when using the example, perhaps the library no longer works?

@cofonseca
Copy link

@lithdew I believe the issue is that we are querying https://www.youtube.com/search_ajax?, but the required headers have not been set. The following headers must be sent in the request:
x-youtube-client-name: 56
x-youtube-client-version: 20200911

This is easily tested using Postman. When one or both headers are not included, the response is empty. If both headers are included, the response contains search results as we would expect. Here's a screenshot:
image

I would submit a fix for this myself, but I see that you're using your own http library to perform the request and I'm not at all familiar with how it works. I imagine this should be pretty simple, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants