Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I followed answers here http://webapps.stackexchange.com/questions/12311/how-to-download-all-english-books-from-gutenberg which are using wget

I want to download using wget from a particular starting offset http://www.gutenberg.org/robot/harvest?offset=100000filetypes[]=txt. As I've already downloaded previous files, but it starts from the first page.

How can I avoid that?

share|improve this question
    
This question appears to be off-topic... –  TAFKA 'goldilocks' Sep 22 '13 at 9:13
    
@goldilocks I'm note sure. Isn't it wget related? –  user13107 Sep 22 '13 at 9:31
    
Okay, I see your confusion. No, not really, although I guess wget is involved -- it may even be a culprit, but that's not the focus of your question. This: ?offset=100000filetypes[]=txt is a not an instruction for get -- it's part of the URL (the query string) and instructs the www.gutenberg.org server. You could just as easily put it in your browser nav bar. But I think it does contain your problem, which I'll put in an answer... –  TAFKA 'goldilocks' Sep 22 '13 at 9:52
add comment

1 Answer

up vote 1 down vote accepted

I think your problem is in this part of the URL:

?offset=100000filetypes[]=txt

That's a query string with two fields in it (offset and filetypes[]).

Name-value field pairs in a query string should be separated by an ampersand. Try it this way:

?offset=100000&filetypes[]=txt

Without the & separating the fields, you are telling the server you want an offset of "100000filetypes[]=txt". The server then rejects that as an invalid argument and gives you a default of 0 instead.

share|improve this answer
    
why does my browser understand it w/o ampersand? –  user13107 Sep 22 '13 at 12:10
    
"Understand" as in delivers with the correct offset? –  TAFKA 'goldilocks' Sep 22 '13 at 13:47
    
yes! it shows the page with correct offset. –  user13107 Sep 22 '13 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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