Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Downloaded images corrupt #56

Open
coopermaruyama opened this issue Feb 23, 2015 · 3 comments
Open

Downloaded images corrupt #56

coopermaruyama opened this issue Feb 23, 2015 · 3 comments

Comments

@coopermaruyama
Copy link

I tried exitwp on 2 different machines - the downloaded images are corrupt, all of them are exactly 162 bytes as well. It's as if it's only downloading the first 'chunk' or something. I'm using python 2.7.6 on OS X Mavericks.

@Udinic
Copy link

Udinic commented May 6, 2015

I got the same problem. Were you able to overcome this in some way?

@coopermaruyama
Copy link
Author

Yeah, I basically just copied my entire "uploads" folder to an S3 bucket, then did a find/replace on all posts to replace mydomain.com with my S3 bucket URL on all images.

Also FWIW, I traced this issue to this line here: https://github.com/thomasf/exitwp/blob/master/exitwp.py#L331

I believe on our versions of python that urlretrieve function doesn't work. If memory serves me right, I believe I did some testing with urllib2 which seemed to work but never got around to implementing it.

@Udinic
Copy link

Udinic commented Jun 3, 2015

Nice work, thanks for the tip!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants