LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2011, 11:30 AM   #1
mimhedal
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
wget and download from 1x.com


Hi.
I used to download images from example.com with a really simple loop and wget.
Code:
for i in {26615..26200..-1}
  do
     wget http://imghost.example.com/$i.jpg
 done
now, in the path of images, there is a Javascript redirected code to the original image page
Code:
<html><head><script type="text/javascript">location.href='http://example.com/photo/34567/';</script></head></html>
what should i do to fix my code to download images from example.com?
Do not hesitate to mention me that my English is horrible!! )

Last edited by mimhedal; 05-11-2011 at 02:10 PM. Reason: New image site, new user asking about it? Sorry, looks like SPAM to me.
 
Old 01-24-2011, 04:33 AM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware32-stable, Debian32 stable, LFS 7.1
Posts: 385

Rep: Reputation: 44
I suspect the site "example.com" has employed the use of javascript to prevent people from downloading their images with wget or similar utilities. In a nutshell, there's nothing you can do about it. And that's the whole idea: to make sure there is nothing you can do about it.
 
Old 02-16-2011, 12:07 PM   #3
mimhedal
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Stupid solution!!

OK.. after a lot of try to solve the problem in a gentleman way, i create a stupid and simple solution to my problem!
I wrote a script by xdotool (a standard package) and simulated the progress that needed to download from the site. this is my very first version of code:
Code:
for i in {35274..35400}
  do
	if [ ! -f ~/Downloads/$i.jpg ]
	then
	     firefox http://1x.com/photo/$i/ &
     	     xdotool mousemove 232 169
	     sleep 2
	     xdotool click 1
	     sleep 18
	     xdotool mousemove 500 500
	     sleep 0.5
	     xdotool click 3
	     sleep 0.5	
  	     xdotool mousemove 550 340
	     sleep 0.5
	     xdotool click 1
	     sleep 0.5
	     xdotool mousemove 1026 738
	     sleep 0.5
	     xdotool click 1
	     sleep 0.5
	fi
 done
ok.. I know this is not a good code and it's kinda stupid but it's work well and what is more important than this?!
have fun

Last edited by mimhedal; 02-16-2011 at 12:11 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Download with wget.....or!!!!! mpregos Slackware 7 06-23-2009 03:51 PM
Want to download mp3s with wget JosephS Linux - Software 2 01-22-2008 08:11 AM
site download with wget ygloo Linux - General 7 09-27-2006 06:49 AM
wget wont download ?? paul_mat Linux - Software 1 11-01-2005 01:45 AM
what to do with 5 parts of wget download Bruce Hill Linux - Software 2 09-11-2003 11:47 AM


All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration