pat310 / google-trends-api

An API layer on top of google trends
https://www.npmjs.com/package/google-trends-api
MIT License
889 stars 176 forks source link

Proxy Option for Requests #91

Closed MWandtke closed 6 years ago

MWandtke commented 6 years ago

Hey,

sometimes when you are behind a company proxy you will need the proxy option of request. Is it possible, that you can provide this?

Thanks

pat310 commented 6 years ago

hi @MWandtke yea I can provide that. There is a PR open for proxy right now. I was planning to change it so the user can select what proxy library they want to use to increase flexibility and remove the dependency. I'll circle back once that is done but if you need something right away, you should use what has been done in that branch.

MWandtke commented 6 years ago

nice. thanks man. sorry that I didn't see that PR

pat310 commented 6 years ago

no worries 😃

aaronmefford commented 6 years ago

Just submitted a PR that will allow selecting a proxy library.

pat310 commented 6 years ago

Thanks @aaronmefford! Going to cut a new version 4.5.0

ishtartec commented 6 years ago

@pat310, the published version (4.5.0) in the npm repository is using and old google-trends-api.js in the lib directory that is not including the proxy changes. Proxying seems broken right now.

pat310 commented 6 years ago

Thanks mate @ishtartec! Just a cut a new version (4.6.0) for some other changes. Should have a new file in the lib directory now.

ishtartec commented 6 years ago

@pat310, I've created PR #95. The proxy support was broken. It was missing adding the proxy agent options to the nextRequest object. I've tested on a fully proxied environment and it works now.

pat310 commented 6 years ago

👍 👍 closed in #95