python - Image getting corrupted while downloading via wget. Where am I going wrong? -


enter image description here

this image gets corrupted when i'm trying download using wget. i'm not sure i'm going wrong. code:

command = 'wget '  + '-u "mozilla/5.0 (x11; u; linux i686; en-us) applewebkit/534.17 (khtml, gecko) ubuntu/11.04 chromium/11.0.654.0 chrome/11.0.654.0 safari/534.17"'  + image + ' -o ' + path                  ssh.exec_command(command)                 command = 'mogrify -auto-orient ' + path                 ssh.exec_command(command) 

a priori doing right -u , agent string of browser.

this worked asker here :

wget -u "mozilla/5.0 (x11; u; linux i686; en-us) applewebkit/534.17  (khtml, gecko) ubuntu/11.04 chromium/11.0.654.0 chrome/11.0.654.0  safari/534.17" http://static.die.net/earth/mercator/1600.jpg 

so may make sure have in pasted code + image + ' -o ' + path in url form http://static.die.net/earth/mercator/1600.jpg


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -