python - Image getting corrupted while downloading via wget. Where am I going wrong? -
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
Post a Comment