vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
576 stars 102 forks source link

when url contains chinese how to do #94

Open jackila opened 6 years ago

jackila commented 6 years ago

when i take picture use this url www.baidu.com/s?五行币%20是不是传销 it will gei me the error website. i should get like this image

i try to encode the chinese word use utf-8 but i get this error page

,but it can not work .

what should i do

jackila commented 6 years ago

test1

jackila commented 6 years ago

this is message i got when i debug

2018-04-02T15:14:32.696Z - debug: Request query parameters: {"url":"www.baidu.com/s?wd=五行币 是不是传销"} 2018-04-02T15:14:32.696Z - debug: Request body parameters: {} 2018-04-02T15:14:32.715Z - debug: Sending file ("www.baidu.com/s?wd=五行币 是不是传销") in response 2018-04-02T15:14:35.184Z - info2018-04-02T15:14:35.185Z - : Capture site screenshot: "www.baidu.com/s?wd=五行币 是不是传销" debug: Options for script: {"url":"http://www.baidu.com/s?wd=五行币 是不是传销"}, base64: eyJ1cmwiOiJodHRwOi8vd3d3LmJhaWR1LmNvbS9zP3dkPZRMASAvDS8gACJ9, command: ["phantomjs","--ignore-ssl-errors=true","--web-security=false","/Users/jackila/code/github/manet/src/scripts/screenshot.js","eyJ1cmwiOiJodHRwOi8vd3d3LmJhaWR1LmNvbS9zP3dkPZRMASAvDS8gACJ9","/var/folders/jb/rgx6f9ln2szfjskrylzp_vbm0000gn/T/fddc5bde6e1c67676e883fa58699ffa6ac116b7d.png"] / Error: SyntaxError: JSON Parse error: Unterminated string Error: TypeError: undefined is not an object (evaluating 'options.clipRect') 2018-04-02T15:14:37.998Z - debug: Execution time: 2.81 sec 2018-04-02T15:14:37.998Z - debug: Process finished work: eyJ1cmwiOiJodHRwOi8vd3d3LmJhaWR1LmNvbS9zP3dkPZRMASAvDS8gACJ9 2018-04-02T15:14:37.999Z - error: Error while sending data file: ENOENT: no such file or directory, stat '/var/folders/jb/rgx6f9ln2szfjskrylzp_vbm0000gn/T/fddc5bde6e1c67676e883fa58699ffa6ac116b7d.png'