View Single Post
Old 09-26-2009, 05:01 PM   #779
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 olaf View Post
And next question! Is there a way to get rid of the top image in this feed (i've cut out the majority of feeds for this example
You are complicating things.

This is how it should look like:

Code:
from calibre.web.feeds.recipes import BasicNewsRecipe

class Telegram(BasicNewsRecipe):
    title                 = 'Telegram'
    oldest_article        = 2
    max_articles_per_feed = 100
    no_stylesheets        = True
    encoding              = 'cp1252'
    use_embedded_content  = False
    language              = 'en'
    extra_css             = ' .headline{font-size: x-large} '

    keep_only_tags     = [dict(name='div', attrs={'class':['headline','subHeadline','byline','articleBody']})]

    remove_tags = [
                     dict(name=['object','link','embed'])
					,dict(name='div',attrs={'class':['relatedContent','verdana11']})
                  ]

    remove_tags_after  = dict(name='div', attrs={'class':'verdana11'})

    feeds = [(u'Frontpage News', u'http://www.telegram.com/apps/pbcs.dll/section?Category=RSS03&MIME=xml')]
kiklop74 is offline