programminglinguist
July 22nd, 2010, 06:00 AM
#!/bin/bash
wget -F -B -i -r -p -e robots=off -A .png,.jpg --no-directories http://en.wikipedia.org/wiki/Rome
My goal is to download all .png and .jpg files from the wikipedidia rome website (it's just an example website) w/o directories and asap.
I am coming across A LOT of trouble and the code really isn't making sense to me. But somehow this combination of options worked for wget. I read up on the manual of wget and didn't even get close to a 50% understanding of what I'm doing but, it kinda works.
I ran this script inside a folder and a whole buncha png and jpg files started downloading. Sounds good right? I notice that a lot of them have a weird thumbnail, all of them similar and when i try to open the images I see this error message
Error interpreting JPEG image file (Not a JPEG file: starts with 0x3c 0x21)
which is weird because it clearly says in the properties that the image IS in fact a JPEG. The fileszie isn't suspicious either. 40kb. That sounds like a jpeg to me.
Any help to get this to work?
wget -F -B -i -r -p -e robots=off -A .png,.jpg --no-directories http://en.wikipedia.org/wiki/Rome
My goal is to download all .png and .jpg files from the wikipedidia rome website (it's just an example website) w/o directories and asap.
I am coming across A LOT of trouble and the code really isn't making sense to me. But somehow this combination of options worked for wget. I read up on the manual of wget and didn't even get close to a 50% understanding of what I'm doing but, it kinda works.
I ran this script inside a folder and a whole buncha png and jpg files started downloading. Sounds good right? I notice that a lot of them have a weird thumbnail, all of them similar and when i try to open the images I see this error message
Error interpreting JPEG image file (Not a JPEG file: starts with 0x3c 0x21)
which is weird because it clearly says in the properties that the image IS in fact a JPEG. The fileszie isn't suspicious either. 40kb. That sounds like a jpeg to me.
Any help to get this to work?