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

Allow for the user to provide their own axios instance #58

Closed Wazbat closed 9 months ago

Wazbat commented 1 year ago

Describe your suggestion

I'm having a lot of trouble using proxies with this library, and just axios in general. I found a solution that works with my proxies, however it requires me to create a dedicated instance of axios via axios.create({ httpsAgent }) with an agent created by https-proxy-agent

For some strange reason, it only works with newly created instances. If provided to an existing axios instance, it sadly doesn't work, which means that if I provide it to this package it also doesn't work

It would be great if this package allowed people to provide their own instance of axios for requests. I can try to open a PR to do this

Other details

No response

Checklist

Wazbat commented 1 year ago

Ahh... So it turns out it's just our proxy provider doesn't allow requests to google's domains, so that's probably why it wasn't working haha

Though the PR is open now, I'll let you decide on if to add it or not

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.