View Single Post
Old 02-20-2009, 01:07 PM   #255
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,426
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Will be fixed in the next release

Quote:
Originally Posted by kitzj0 View Post
I posted a couple of days ago a problem I was having with a feed to my local paper and kiklop74 was kind to provide assistance. The code is:

Code:
class AdvancedUserRecipe1234144423(BasicNewsRecipe):
    title          = u'Cincinnati Enquirer'
    oldest_article = 7
    language       = _('English')
    __author__     = 'Joseph Kitzmiller'
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False
    remove_javascript     = True
    encoding = 'cp1252'
    extra_css = ' p {font-size: medium; font-weight: normal;} '
    
    keep_only_tags = [dict(name='div', attrs={'class':'padding'})]
    
    remove_tags = [
                     dict(name=['object','link','table','embed'])
                    ,dict(name='div',attrs={'id':'pluckcomments'})
                    ,dict(name='div',attrs={'class':'articleflex-container'})
                  ]
   
    feeds          = [(u'Cincinnati Enquirer', u'http://rss.cincinnati.com/apps/pbcs.dll/section?category=rssenq01&mime=xml')]

    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        for item in soup.findAll(face=True):
            del item['face']
        return soup
This worked if I manually put the generated epub file into the Sony library software to transfer to my reader. I downloaded the new version of Calibre and now I can use calibre to transfer over the file and I am getting text for the article. However, now in the generated epub file I am getting this overlaying the text:

Starting first parse
.Parsing macro pluck_InitializeArticles
..Build 3: 953 ms (Article)
...Build 3: 46 ms (Article)
..Build 9: 187 ms (Content)
.Completed macro pluck_InitializeArticles
.Build 0: 16 ms (Misc)
.Build 3: 2984 ms (Article)
.Parsing macro seo
..Build 0: 0 ms (Misc)
.Completed macro seo
.Parsing macro sitecatalyst
..Build 0: 0 ms (Misc)
.Completed macro sitecatalyst
..Build 3: 62 ms (Article)
.Parsing macro footer_local
--> Starting first parse
.Build 0: 16 ms (Misc)
.Build 3: 31 ms (Article)
.Build 9: 0 ms (Content)
Retrieve categories: 0ms
Read templates: 0ms
Read objects: 0ms
Scripts: 0ms

the message goes on for several lines. This happens regardless of using the Sony library software or calibre to transfer the feed to the device. Is this a bug?
kovidgoyal is offline