How do i go about downloading every wallpaper from interfaceLIFT? I have Ubuntu/and can use scripts(but don't know how to write them)
September 11, 2008 4:04 PM Subscribe
Hey guys. I love the wallpapers on InterfaceLift but i find their download process really annoying. Now that i have a program to switch my wallpapers randomly from a folder I was wondering if there is a way to mass download all the wallpapers from interfacelift. Maybe a script or download? I am using Ubuntu but am only a intermediatish at it so I am not sure how to write my own scripts yet. Thanks!
Go to one of the download pages, e.g. http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/ and pipe that URL into this snippet ...
wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/ | perl -ne 'if (m#(/dl/wallpaper/\w+)#) { print qq-wget http://interfacelift.com$1\n-} ;'
If you think you like the output, then run it again, but piped into | sh -x
posted by devbrain at 4:39 PM on September 11, 2008
wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/ | perl -ne 'if (m#(/dl/wallpaper/\w+)#) { print qq-wget http://interfacelift.com$1\n-} ;'
If you think you like the output, then run it again, but piped into | sh -x
posted by devbrain at 4:39 PM on September 11, 2008
Ah, scratch that. You need a m#(/dl/wallpaper/\w+.jpg)# in the regex and the download gets tripped by their anti-script measures.... back to the drawing board.....
posted by devbrain at 4:41 PM on September 11, 2008
posted by devbrain at 4:41 PM on September 11, 2008
Try this one:
Run it first to check, then the second time with "| sh -x" to execute each command.
Purely from quick observation -- the download page lists /dl/wallpaper/ but the link is /wallpaper/download/ and the four digit code gets translated to a five digit code with leading zero (you might need to smarten that up if you get any three or five digit codes on the first page) .....
posted by devbrain at 4:45 PM on September 11, 2008
Run it first to check, then the second time with "| sh -x" to execute each command.
Purely from quick observation -- the download page lists /dl/wallpaper/ but the link is /wallpaper/download/ and the four digit code gets translated to a five digit code with leading zero (you might need to smarten that up if you get any three or five digit codes on the first page) .....
wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/ | perl -ne 'if (m#/dl/wallpaper/(\w+.jpg)#) { print qq#wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/0$1\n#} ;' | sh -x
posted by devbrain at 4:45 PM on September 11, 2008
I have no idea what the answer to your question is, but I'm so glad you mentioned that site!
posted by dpx.mfx at 4:58 PM on September 11, 2008
posted by dpx.mfx at 4:58 PM on September 11, 2008
Response by poster: uh devbrain when i run that script (which i do not understand, but thats another matter) i get output such as
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01673_meerkatwatch_1920x1200.jpg
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01672_rangitoto_1920x1200.jpg
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01671_goldsky_1920x1200.jpg
I am not sure what this means but i realize that its only referencing the wallpapers from the front page. Is there a way to get it to reference all the wallpapers in its collection of say a specific resolution 1280x800?
Also, Ive only used the wget command once and dont you have to give it a location to download the pictures to?
And dpx.mfx yeah interfacelift is a great site. That and Vlad Studio and desktopography are the main wallpaper sites that i use.
posted by Javed_Ahamed at 5:26 PM on September 11, 2008
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01673_meerkatwatch_1920x1200.jpg
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01672_rangitoto_1920x1200.jpg
wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/01671_goldsky_1920x1200.jpg
I am not sure what this means but i realize that its only referencing the wallpapers from the front page. Is there a way to get it to reference all the wallpapers in its collection of say a specific resolution 1280x800?
Also, Ive only used the wget command once and dont you have to give it a location to download the pictures to?
And dpx.mfx yeah interfacelift is a great site. That and Vlad Studio and desktopography are the main wallpaper sites that i use.
posted by Javed_Ahamed at 5:26 PM on September 11, 2008
Try this (extension of devbrain's script):
-----------------------
#!/bin/bash
for ((i=1;i<=150;i+=1)); do
wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index$i.html | perl -ne 'if (m#/dl/wallpaper/(\w+.jpg)#) { print qq#wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/0$1\n#} ;' | sh -x
sleep 1
done
-----------------------
Paste to a file called download.sh and make it executable (chmod 700 download.sh). Change 1920x1200 to 1280x800 to get a different size. If there are more than 150 changes, change i<=150 to something larger.
posted by null terminated at 5:51 PM on September 11, 2008
-----------------------
#!/bin/bash
for ((i=1;i<=150;i+=1)); do
wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index$i.html | perl -ne 'if (m#/dl/wallpaper/(\w+.jpg)#) { print qq#wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/0$1\n#} ;' | sh -x
sleep 1
done
-----------------------
Paste to a file called download.sh and make it executable (chmod 700 download.sh). Change 1920x1200 to 1280x800 to get a different size. If there are more than 150 changes, change i<=150 to something larger.
posted by null terminated at 5:51 PM on September 11, 2008
The above script loops over every page of wallpaper, ie:
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index1.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index2.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index3.html
Then it uses devbrain's script to pull out the wallpaper URLs from the current page. These URLs are fed into wget and downloaded.
posted by null terminated at 5:53 PM on September 11, 2008
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index1.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index2.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index3.html
Then it uses devbrain's script to pull out the wallpaper URLs from the current page. These URLs are fed into wget and downloaded.
posted by null terminated at 5:53 PM on September 11, 2008
Also, here's a complete list of 1280x800 wallpapers:
http://rafb.net/p/Leyttl62.html
posted by null terminated at 6:08 PM on September 11, 2008
http://rafb.net/p/Leyttl62.html
posted by null terminated at 6:08 PM on September 11, 2008
Response by poster: If there are more than 150 changes, change i<=150 to something larger? What does that mean and where are these pictures being downloaded too? I am the noob :D
posted by Javed_Ahamed at 7:47 PM on September 11, 2008
posted by Javed_Ahamed at 7:47 PM on September 11, 2008
Response by poster: Oh i see Its dloading them all to the folder i have the script in. Thanks! I still do not get the 150 changes part though!
posted by Javed_Ahamed at 7:49 PM on September 11, 2008
posted by Javed_Ahamed at 7:49 PM on September 11, 2008
for ((i=1;i<>
is a command that says to set the variable i to 1 (i=1) and then increment it by one (i+=1) as long as i is less than or equal to 150 (i<>
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index$i.html
is replaced by:
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index1.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index2.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index3.html
...
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index150.html
etc
If there were 170 pages, you'd need to change i<> http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index170.html
posted by null terminated at 8:02 PM on September 11, 2008
is a command that says to set the variable i to 1 (i=1) and then increment it by one (i+=1) as long as i is less than or equal to 150 (i<>
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index$i.html
is replaced by:
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index1.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index2.html
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index3.html
...
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index150.html
etc
If there were 170 pages, you'd need to change i<> http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index170.html
posted by null terminated at 8:02 PM on September 11, 2008
...that formatting got screwed up.
The first line should refer say:
for ((i=1;i<=150;i+=1)); do
and the last should say:
If there were 170 pages, you'd need to change i<=150 to i<=170, so the script would loop 170 times and access the URL:
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index170.html
posted by null terminated at 8:06 PM on September 11, 2008
The first line should refer say:
for ((i=1;i<=150;i+=1)); do
and the last should say:
If there were 170 pages, you'd need to change i<=150 to i<=170, so the script would loop 170 times and access the URL:
http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1920x1200/index170.html
posted by null terminated at 8:06 PM on September 11, 2008
Response by poster: Ah ok thank you i get it now! Again thank you so much null and devbrain for the script it works great! Saved me hours too!
posted by Javed_Ahamed at 8:16 PM on September 11, 2008
posted by Javed_Ahamed at 8:16 PM on September 11, 2008
Best answer: btw if anyone is looking at this thread for future reference here is the code for you to make a bash script from:
#!/bin/bash
for ((i=1;i<> wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1280x1024/index$i.html | perl -ne 'if (m#/dl/wallpaper/(\w+.jpg)#) { print qq#wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/0$1\n#} ;' | sh -x
sleep 1
done
posted by Javed_Ahamed at 8:10 AM on September 28, 2008
#!/bin/bash
for ((i=1;i<> wget -q -O - http://interfacelift.com/wallpaper_beta/downloads/date/widescreen/1280x1024/index$i.html | perl -ne 'if (m#/dl/wallpaper/(\w+.jpg)#) { print qq#wget --referer=http://interfacelift.com/ http://interfacelift.com/wallpaper/downloads/0$1\n#} ;' | sh -x
sleep 1
done
posted by Javed_Ahamed at 8:10 AM on September 28, 2008
This thread is closed to new comments.
ID_name_resolution.jpg. A light bit of scripting would be all it takes to grab everything with a utility like curl.
posted by wongcorgi at 4:14 PM on September 11, 2008