LuanRT / google-this

A simple yet powerful module to retrieve organic search results and much more from Google.
https://www.npmjs.com/package/googlethis
MIT License
320 stars 77 forks source link

v1.7.1 - SearchError: Could not execute search. Maximum number of redirects exceeded #60

Closed DianaIonita closed 12 months ago

DianaIonita commented 12 months ago

Steps to reproduce

I've been using the module successfully, but all of a sudden, in the middle of a script, I started getting this error. Now, any query I do via this module gives me back the same error.

Sample usage:

const options = {
        page: 0,
        safe: false,
        parse_ads: false,
        additional_params: {
            hl: language
        }
    }

const response = await google.search(query, options) // error happens here

Failure Logs

SearchError: Could not execute search
    at Object.search (C:\...\node_modules\googlethis\lib\core\main.js:70:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

info: { status_code: 0, message: 'Maximum number of redirects exceeded' },
  date: 2023-08-31T16:27:03.467Z,
  version: '1.7.1'

Expected behavior

I expected the search to not fail.

Current behavior

The search functionality is currently failing.

Version

Default

Anything else?

No response

Checklist

DianaIonita commented 12 months ago

I've been rerunning my search script and the error went away. It may have occurred because, for a short time, I was smashing it with 3 parallel searches. If anyone sees this in the future, give it half an hour or so and retry.