The url of the forum thread I'm trying to get access to is in the form

http://domain.com/showthread.php?threadid=3333333&userid=0&perpage=40&pagenumber=1

I've tried

wget --user-agent=Mozilla/5.0 -k -m -E -p -np -R http://domain/showthread.php?noseen=0&threadid=3333333&pagenumber=1

and I've had no luck.

link|improve this question
feedback

2 Answers

Why not just in a for loop:

for pageno in {1..1000000}; do
    wget ... http://domain/showthread.php?noseen=0&threadid=3333333&pagenumber=$pageno || break
done

or perhaps a while loop is better, if a little longer to write:

i=1
while true; do
    wget ... http://domain/showthread.php?noseen=0&threadid=3333333&pagenumber=$pageno
    if test $? -ne 0; then
        break
    fi
    i=$((i+1))
done
link|improve this answer
OP here, thanks Mikel. Actually I'm having problems just downloading the contents of the one page in the thread. Once I have that going I was thinking of the first way you suggested, but there seems to be something wrong with my wget paramaters (? maybe? I don't know) – user65999 Feb 4 '11 at 2:01
feedback

Might be worth checking if the forum supports rss feeds of sections / threads. It'd save you bother.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.