scraperjs icon indicating copy to clipboard operation
scraperjs copied to clipboard

Character encoding - possible to set it?

Open mesic opened this issue 8 years ago • 2 comments

I'm trying to parse a website however the characters are read wrong, probably due to the character setting. Is there any way this can be set?

mesic avatar Oct 07 '16 10:10 mesic

Yes, scraperjs uses request, you should refer back to it.

ruipgil avatar Oct 16 '16 21:10 ruipgil

Instead of a string for the url: scraperjs.StaticScraper.create('http://www.somesite.com').scrape(...)

Use an object with the parameters url and encoding, like this: scraperjs.StaticScraper.create({ url: 'http://www.somesite.com', encoding: "binary" }).scrape(...)

PauloAmaroRamos avatar Nov 21 '17 15:11 PauloAmaroRamos