Thread: EPUB output
View Single Post
Old 02-17-2009, 03:22 PM   #355
klx14
Junior Member
klx14 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2009
Device: Sony PRS-505
I can confirm the bug reported in #346 and #348. With the attached self-developed recipe I have exactly the same problem: Page count and TOCs are OK, but following a link gives a blank page only. Reverting to 0.4.136 solved the problem for me - so there is definitely a regression in 0.4.137. My suspicion is that there is a bug in the EPUB conversion routines, not the fetching.

Here is the recipe I am using:

Code:
class AdvancedUserRecipe1231145686(BasicNewsRecipe):
    title          = u'Tagesspiegel'
    encoding = 'cp1252'
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    remove_tags = [dict(attrs={'class':['related', 'themen_alarm',
                                        'tso_tool', 'postings ps_swus_nowrap',
                                        'anzeige_spacer', 'tool2',
                                        'anzeige_top_double_border',
                                        'ISI_IGNORE ps_rs_versteckt',
                                        'ISI_IGNORE tso_tools',
                                        'login_box', 'tso_small',
                                        'aufmacher_content',
                                        'tso_breadcrumb', 'tso_headline']}),
                   dict(id=['footer', 'toolsRight', 'articleInline',
                            'navigation', 'archive', 'side_search',
                            'blog_sidebar', 'side_tool', 'thumblupe',
                            'thumbbig_var', 'linkbox_spacer',
                            'navbar', 'header', 'search', 'masthead',
                            'banner', 'sky', 'sky_move']),
                   dict(name=['script', 'noscript', 'style',
                              'pinboardbtn'])]
    remove_tags_after  = dict(id='ar_text')
    import re
    preprocess_regexps = [
        (re.compile(r'float:left;', re.DOTALL|re.IGNORECASE),
         lambda match: ''),
        ]

    extra_css = '#ar_text {font-family:times; font-size:9pt}'
    cover_url = 'file:///home/peterh/eBooks/tagesspiegel.png'
    html2lrf_options = ['--base-font-size', '9']
    
    feeds          = [(u'Aktuelle Nachrichten aus dem Ressort Politik', u'http://www.tagesspiegel.de/rss/politik.xml'), (u'Aktuelle Nachrichten aus Berlin und Brandenburg', u'http://www.tagesspiegel.de/rss/berlin.xml'), (u'Aktuelle Nachrichten aus dem Ressort Wirtschaft', u'http://www.tagesspiegel.de/rss/wirtschaft.xml'), (u'Aktuelle Nachrichten aus dem Ressort Kultur', u'http://www.tagesspiegel.de/rss/kultur.xml'), (u'Buch-Rezensionen aus dem gedruckten Tagesspiegel', u'http://www.tagesspiegel.de/rss/literatur.xml'), (u'Aktuelle Nachrichten aus aller Welt', u'http://www.tagesspiegel.de/rss/welt.xml')]
BTW on Linux you can revert by issuing:

Code:
easy_install -U calibre==0.4.136
calibre_postinstall
klx14 is offline   Reply With Quote