View Single Post
Old 02-20-2009, 12:40 PM   #253
kitzj0
Member
kitzj0 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2009
Device: PRS-505
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?

Last edited by kitzj0; 02-20-2009 at 12:45 PM.
kitzj0 is offline