Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding proxy to x-ray node js #299

Closed
bassemAmous opened this issue Jan 11, 2018 · 5 comments
Closed

adding proxy to x-ray node js #299

bassemAmous opened this issue Jan 11, 2018 · 5 comments

Comments

@bassemAmous
Copy link

Subject of the issue

Describe your issue here.

Your environment

  • version of node: run node --version
  • version of npm: run npm --version

Steps to reproduce

Tell us how to reproduce this issue.

Expected behaviour

Tell us what should happen.

Actual behaviour

Tell us what happens instead.

@bassemAmous
Copy link
Author

I am developing a node js application and I am scraping a web site using x-ray and I think the blocked my ip address so how can I configure a proxy or hide my Ip address for that ? here is my code:

var Xray = require('x-ray');
var x = Xray()
x('https://www.myurl.com',  {


    title: x('#cm_cr-review_list .a-section.review', [{,
        blogs:"..a-text-bold"
    }]),
})
    .paginate('li.a-l a@href')
    .write('result.json')

@0xgeert
Copy link
Contributor

0xgeert commented Jan 11, 2018 via email

@bassemAmous
Copy link
Author

@gebrits Thank you for your answer but I didn't really understand the second part could you please send me an example for that ?

@0xgeert
Copy link
Contributor

0xgeert commented Jan 13, 2018

Something like this. Untested: (second option in the comments)

https://gist.github.com/gebrits/57689768eceaec43ae0ddd17949d7503

@bassemAmous
Copy link
Author

Thank you I just resolved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants