bda-research / node-crawler

Web Crawler/Spider for NodeJS + server-side jQuery ;-)

Home Page:http://node-crawler.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tostring of response body corrupts download of binary files

mattimatti opened this issue · comments

Maybe not purpose of the library itself to download binary files but on line 250:

response.body = response.body.toString();

corrupts download of binary files

Ciao!
:m

Same as #9 (comment)

I'll add this to the roadmap

Same field as #53

Just set encoding=null, so that crawler won't try to convert to string.

commented

setting encoding to null trows exception:
TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: null
So this is not an option either...