View Single Post
Old 03-28-2010, 03:26 PM   #1671
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by Semonski View Post
Thank you so much..... I'm trying it out now.....

Kos
Your recipe is too complicated. This is simplified and cleaned-up version (add more feeds, this is just example):

Code:
class Telegram(BasicNewsRecipe):
    title                 = 'Telegram'
    oldest_article        = 2
    max_articles_per_feed = 100
    no_stylesheets        = False
    use_embedded_content  = False
    encoding              = 'cp1252'
    publication_type      = 'newspaper'
    remove_empty_feeds    = True
    extra_css             = ' body{font-family: Verdana,sans-serif} .headline{font-size: xx-large; font-weight: bold} .mainPhotoCaption{font-size: x-small} '

    keep_only_tags     = [dict(name='div', attrs={'id':'articleWell'})]
    remove_tags_before = dict(attrs={'class':'headline'})
    remove_tags_after  = dict(attrs={'id':'zoom1'})
    remove_tags = [
                     dict(name='div', attrs={'class':'relatedContent'})
                    ,dict(name=['object','link','iframe'])
                  ]

    feeds          = [ 
                        (u'Front page' , u'http://www.telegram.com/apps/pbcs.dll/section?Category=RSS03&MIME=xml')
                     ]

    def preprocess_html(self, soup):
        return self.adeify_images(soup)
kiklop74 is offline