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

Search suggestions are rate limited #1463

Open
1 task done
datanomi opened this issue Sep 20, 2022 · 6 comments
Open
1 task done

Search suggestions are rate limited #1463

datanomi opened this issue Sep 20, 2022 · 6 comments
Labels
bug Something isn't working P0

Comments

@datanomi
Copy link
Contributor

datanomi commented Sep 20, 2022

Official Instance

Describe the bug

I get a "Could not parse json response" response when it's loading search suggestions.
Search itself works but search suggestions do not.
Suggestions work on the official instance and other instances as well, but it is API related.

To Reproduce

Do any new search that is not cached by Cloudflare at https://api-piped.mha.fi/opensearch/suggestions?query=

Expected behavior

Return search suggestions successfully

Logs/Errors

An error occoured in the path: /opensearch/suggestions
org.schabi.newpipe.extractor.exceptions.ParsingException: Could not parse json response
        at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor.suggestionList(YoutubeSuggestionExtractor.java:78)
        at me.kavin.piped.utils.ResponseHelper.opensearchSuggestionsResponse(ResponseHelper.java:516)
        at me.kavin.piped.ServerLauncher.lambda$mainServlet$17(ServerLauncher.java:169)
        at io.activej.http.AsyncServlet.lambda$ofBlocking$0(AsyncServlet.java:43)
        at io.activej.promise.Promise.lambda$ofBlocking$12(Promise.java:250)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.grack.nanojson.JsonParserException: Unexpected token 'ml' on line 1, char 1
        at com.grack.nanojson.JsonTokener.createParseException(Unknown Source)
        at com.grack.nanojson.JsonTokener.createHelpfulException(Unknown Source)
        at com.grack.nanojson.JsonTokener.advanceToToken(Unknown Source)
        at com.grack.nanojson.JsonParser.advanceToken(Unknown Source)
        at com.grack.nanojson.JsonParser.parse(Unknown Source)
        at com.grack.nanojson.JsonParser$JsonParserContext.from(Unknown Source)
        at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeSuggestionExtractor.suggestionList(YoutubeSuggestionExtractor.java:64)
        ... 7 more

Browser, and OS with Version.

Firefox 104 on Arch Linux

Additional context

No response

@datanomi datanomi added the bug Something isn't working label Sep 20, 2022
@FireMasterK FireMasterK added P1 bug Something isn't working and removed bug Something isn't working labels Sep 29, 2022
@FireMasterK
Copy link
Member

Hi, could you try fetching https://suggestqueries.google.com/complete/search?client=youtube&jsonp=JP&ds=yt&gl=US&q=test from your instance's IP? I suspect google has some kind of blocking perhaps on this endpoint 🤔

@datanomi
Copy link
Contributor Author

Hi, could you try fetching https://suggestqueries.google.com/complete/search?client=youtube&jsonp=JP&ds=yt&gl=US&q=test from your instance's IP? I suspect google has some kind of blocking perhaps on this endpoint 🤔

Hey, that seems to be the case.

Sorry...
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

So I guess I can't do anything about it then 😕

@FireMasterK
Copy link
Member

Can you see if the suggestions from the regular youtube.com website work?

@FireMasterK
Copy link
Member

Hi, there's a new update that should fix this, could you let me know if it works (after updating your instance)?

@ghost
Copy link

ghost commented Nov 3, 2022

Search suggestions disappear for me as soon as I enter 3rd letter.

@jerlam06
Copy link

I have the exact same problem, same error in dev console.

@FireMasterK FireMasterK changed the title Search suggestions not working on my instance Search suggestions are rate limited Jan 27, 2023
@FireMasterK FireMasterK added P0 and removed P1 labels Jan 27, 2023
@FireMasterK FireMasterK pinned this issue Jan 27, 2023
@FireMasterK FireMasterK unpinned this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0
Projects
None yet
Development

No branches or pull requests

3 participants