![]() |
#1 |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Apr 2011
Device: Kindle wifi; Dell 2in1
|
multi-page coding for Creative Blog
I'm trying to do some updating to the Creative Blog recipe because I just found out there are a few articles that go to a second page and it's right now not pulling the second pages. So this is the modified recipe that doesn't work yet.
Spoiler:
this is the html coding from one of the articles that shows how it links to the second page. One thing to note is that there are two spots that have the div class="item-list" as it's lead. Spoiler:
I think I have the type of coding that's needed, but if anyone has an easier way for the few articles to pull the second page, please let me know. Just to note, recursion doesn't work as it pulls a lot more links and creates a very big epub, already tried it. Last edited by Camper65; 03-15-2015 at 05:22 PM. Reason: needed to add about recursion |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont use append_page(). Set recursions = 1 and use is_link_wanted() instead.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Apr 2011
Device: Kindle wifi; Dell 2in1
|
Kovid I modified it to use the recursive and is_link_wanted but can't get the is_link_wanted right. Can you help with what I should be using to find the url that corresponds to li class=pager-next or use the href that correspondence to the "next" entry so that I can get the second page (or more) properly. I am again posting the recipe so you can see the updates.
Spoiler:
Last edited by PeterT; 03-16-2015 at 10:33 PM. Reason: Wrapped code in [code] .. [/code] block |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The url is simply the contents of the href attribute, so your regex needs to just match that. Or if you want to use the tag, then use something like
if tag.findParent(li, attrs={'class':'pager-next'}) is not None: |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with multi-page threads? | meeera | Feedback | 3 | 02-24-2014 08:04 PM |
Fetching multi-page articles | Steven630 | Recipes | 27 | 08-21-2012 10:04 PM |
PRS-T1 Multi-page advance...any remedy?? | petercreasey | Sony Reader | 24 | 06-02-2012 03:38 PM |
Multi page possible? | ProDigit | Sigil | 11 | 12-30-2011 12:13 AM |
help! how to handle multi page topic | zhixiangpan | Recipes | 4 | 08-31-2011 09:46 PM |