View Single Post
Old 08-18-2012, 03:11 AM   #24
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 180
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by kovidgoyal View Post
Use the source, Luke: http://bazaar.launchpad.net/~kovid/c.../feeds/news.py in particular look at the is_link_wanted() function.
Thanks. But seems that the next-page link on the last page cannot be simply filtered out since it's identical to previous links (just that it's redundant).

Speaking of 'print', will something like this do?

Code:
    def append_page(self, soup, appendtag, position):
        pager = ...
        if pager:
           self.log('Found pager')
...
Still, it failed to find the pager in the first place.

Could it be possible that the "soup" in index-parsing and the "soup" in append_page are confused? (So it's looking for the pager in the index page rather than the article page)

Last edited by Steven630; 08-22-2012 at 06:48 AM.
Steven630 is offline   Reply With Quote