jprichardson / node-google

A Node.js module to search and scrape Google.
MIT License
455 stars 115 forks source link

Proxy usage #13

Closed tpickett closed 9 years ago

tpickett commented 10 years ago

I see your using request for getting the source, any way you could pass in an object to request instead of just the URL? That we you could set a proxy property on the google variable and use that property (if set) as the value for the proxy key in the request object.

I could send a pull request in a couple of days. just a little busy at the moment. that ok?

jprichardson commented 10 years ago

Sure. PR welcome :)

On Tue, Oct 7, 2014 at 10:21 PM, Griffith T. Pickett < notifications@github.com> wrote:

I see your using request for getting the source, any way you could pass in an object to request instead of just the URL? That we you could set a proxy property on the google variable and use that property (if set) as the value for the proxy key in the request object.

— Reply to this email directly or view it on GitHub https://github.com/jprichardson/node-google/issues/13.

Simple & Secure Bitcoin Wallet: https://www.coinbolt.com Bitcoin / JavaScript: http://cryptocoinjs.com Follow me on Twitter: http://twitter.com/jprichardson

alexzaporozhets commented 10 years ago

Any updates about proxy-feature?

ralyodio commented 9 years ago

+1

tpickett commented 9 years ago

It is there now, should be in the README:

var google = require('google');
google.proxy = 'http://user:password@192.168.5.4:80';
google('node.js best practices', function(err, next, links){
  …
});
jprichardson commented 9 years ago

Yep, @tpickett is right. It's in the README. I guess we could modify the README to make that more clear, but closing this issue since it's supported behavior thanks to the work that @tpickett did.