NullDev / qwant-api

:crystal_ball: Unofficial API wrapper for qwant
https://qwant.com
Apache License 2.0
32 stars 4 forks source link

Error code 9 #5

Open LohithArcot opened 5 years ago

LohithArcot commented 5 years ago

What does the error code 9 mean? get request URL : https://api.qwant.com/api/search/images?q=stackoverflow response: {"status":"success","data":{"result":{"items":[]},"error_code":9}} What does the error_code 9 mean ?

floweb commented 5 years ago

@lohithpro I think this is related to this issue. I guess you need to pass some more params to your query.

kokmok commented 5 years ago

got rid of the error by adding a Mozilla user-agent to the request. You also have to add some parameters to the request. I Don't kwow what they all do. https://api.qwant.com/api/search/images?count=10&offset=0&q=test&t=images&uiv=1 exemple for my python script :

headers = {
        'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
    }

with a home made user-agent i was stuck with error 9

pekempy commented 4 years ago

@kokmok My god, &uiv=1 stops error 9 ! Definitely need a lil rewrite of my program now. THANK YOU