05-18-2012, 01:54 PM | #1 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
Something Awful (The Internet Makes You Stupid)
Spoiler:
Notes: 1. I've commented out sections related with video and flash, you can uncomment them if your device can handle the media. 2. Most sections haven't been updated for years, but remove_empty_feeds takes care of that. 3. I'm still struggling with the multi page articles, found an interesting snippet in the re-usable code thread but wasn't able to make it work. The site just uses something like: Code:
<p class="pagebar"> Pages: <a href="?page=1" class="curpage">1</a> <a href="?page=2">2</a> <a href="?page=3">3</a> <a href="?page=4">4</a> <a href="?page=5">5</a> <a href="?page=6">6</a> <a href="?page=2">Next page</a> » </p> |
06-06-2012, 02:15 PM | #2 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
I've got this one reworked and working quite fine except the multipage articles. Problem is calibre (or soup or whatever) doesn't recognize '<a href="?page=2">2</a>' as a valid link, even if it is (a relative one). I redefined is_link_wanted to log every link analyzed and they don't reach the function.
So I guess the solution is to append the current URL in preprocess_html or preprocess_regexps... but I don't know where the current page URL is stored, or if it's accessible. In other words, I want to replace "?page=2" with "(current URL)?page=2", but don't know how to access "current URL". Any hints? |
Advert | |
|
06-07-2012, 03:39 AM | #3 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There isn't anyway to get the current url context in those methods. Supporting this would require changing the download system. If you attach your recipe, I'll see if I can have these links correctly processed by the download system.
|
06-07-2012, 08:59 AM | #4 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
Thanks Kovid. Bellow it's one of my failed attempts. And here's an actual link to a multipage article in the site if you want to have a look: http://www.somethingawful.com/d/dung...estor-gunt.php
Interestingly, when opened with the Kindle web browser and selecting "article view" it grabs all the pages in one. I know it has nothing to do with calibre, but perhaps it can offer some hint. Spoiler:
|
06-08-2012, 11:50 PM | #5 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I've committed a fix so that query only relative URLs are not ignored, will be in next weeks release. Note that you need recursions=1 in your recipe.
|
Advert | |
|
06-10-2012, 06:46 PM | #6 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
Thank you again, Kovid. Please note that this is just an amusement site and there's nothing urgent or important about it, I was just a bit perplexed for not being able to make multipage work after multiple attempts.
|
06-15-2012, 03:10 PM | #7 |
Connoisseur
Posts: 89
Karma: 19669
Join Date: Apr 2012
Device: Kindle Touch
|
This one works well with multipage, thanks to the good non-stop work of Mr. Goyal. Needs version 0.8.56 or latter.
As with any non daily publication, set oldest_article to your downloading preferences (default 7). Spoiler:
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it me, or is Mobipocket for Windows awful? | XanderRichards | General Discussions | 35 | 04-11-2012 09:30 AM |
NC is an awful reader | Avenarius | Nook Color & Nook Tablet | 40 | 01-31-2011 11:27 AM |
Awful, just AWFUL formatting in ebooks | MrPLD | Writers' Corner | 49 | 10-03-2010 10:36 PM |
Scrolling - incredibly awful | dso371 | Bookeen | 33 | 02-21-2008 07:08 AM |