View Single Post
Old 08-14-2012, 06:56 AM   #1
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 178
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Fetching multi-page articles (solved)

UPDATE: Problem solved thanks to kiklop74.

Also many thanks to lrui (who also spent a lot of time looking into the issue) and kovidgoyal.



I've read previous threads about multi-page fetching, but they didn't solve the problem I have right now.
I've been trying to fetch articles from a website. If an article has only one page, all is well. If ,however, there is more than one page in an article:

1. There is a clickable "previous page" button on very page, even on the first page (in this case, clicking this button takes you to the same link you are browsing)

2. Likewise, there is a clickable "next page" button even on the last page (when you click "next page" when you are already on the last page, it simply returns you to the last page)

3. There's no option for "single page".

1 and 2 makes it difficult to fetch multi-page articles using append_page.

Here's how the page buttons look like (on the first page of a four-page article):
Code:
<div id="pages" class="text-c">
<a class="a1" href="original link">previous page</a> <span>1</span>
<a href="original link + &page=2">2</a>
<a href="original link + &page=3">3</a>
<a href="original link + &page=4">4</a>
<a class="a1" href="original link + &page=2">next page</a></div>


(To make it clearer, I replaced the actual article link with "original link". original link + &page=2 is actually something like http://.......&id=2352&page=2)


Therefore it's something like:
previous page 1 2 3 4 next page

6 buttons on every page


Anyone can tell me how I should revise the recipe to fetch all pages?

Last edited by Steven630; 08-22-2012 at 06:59 AM. Reason: Problem solved thanks to everyone's help.
Steven630 is offline   Reply With Quote