ruipgil/scraperjs

User-id

QuentinRoy opened this issue · 2 comments

It is sometimes useful to be able to set the user-id/user-agent for the request as the target website may depend on it.

We use requestbehind the scenes, which allows you to do it very easily.

Check this post out. More specifically, the section Be a great lad.

Oh I see. Thank you @ruipgil.

As a suggestion, it could be worse documenting it, especially if it is a supported behavior. Even in the code, the get argument is only named "url". One has to guess that as it is directly forwarded to request, it may be replaced with something else, and look at request documentation to see what is actually possible.

Also, it is possible that there is an error in this post. request’s headers option finishes with an “s”.