You are not logged in.

#1 2009-06-15 04:44:04

jfca283
Member
From: Santiago, Chile
Registered: 2007-10-09
Posts: 177

script for wget downloading "Page Source"...

i need to download the web sources from different pages in the same web address
something like this
http://ZZZ.cl/books?pg=PP1&id=YIU1jlgPjr8C&output=html
...
http://ZZZ.cl/books?pg=PP400&id=YIU1jlgPjr8C&output=html
investigating i got some code

for i in $(seq 30 400); do wget http://ZZZ.cl/books?id=YIU1jlgPjr8C&pg= ... utput=html -O PS$i.txt;done

but it doesn't work

i need to get the web sources from page 1 to 400 in this style and location
/home/jfca283/PS1.txt
...
home/jfca283/PS400.txt
any help will help
thanks!!!

Offline

#2 2009-06-15 05:20:36

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: script for wget downloading "Page Source"...

When you say "it doesn't work", you need to be more specific? What errors are you getting?

I copied and pasted your example, and replaced the 'wget' with an 'echo'. It seems you might have quoting problems. Try putting double quotes (") around the URL.

Last edited by fukawi2 (2009-06-15 05:21:01)

Offline

#3 2009-06-16 01:06:35

babypuncher
Member
From: .au
Registered: 2007-03-12
Posts: 114
Website

Re: script for wget downloading "Page Source"...

Curl works wonders for this kind of stuff.

curl -O "http://ZZZ.cl/books?pg=PP[1-400]&id=YIU1jlgPjr8C&output=html"

Last edited by babypuncher (2009-06-16 01:06:56)

Offline

Board footer

Powered by FluxBB