View Single Post
Old 11-23-2008, 03:56 PM   #2
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 ddavtian View Post
Hi all.

If you know how and have time, please create a recipe for "Contra Costa Times", for few sections, then I can add more myself.

Feeds are under http://www.contracostatimes.com/rss.

Thank you in advance!
David
Code:
#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
contracostatimes.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Contracostatimes(BasicNewsRecipe):
    title                 = u'Contra Costa Times'
    __author__            = 'Darko Miletic'
    description           = 'News'    
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False

    keep_only_tags    = [dict(name='td', attrs={'class':'articleBox'})]
    remove_tags_after = dict(name='div',attrs={'class':'articleBody'})
    remove_tags = [
                      dict(name='div' , attrs={'class':'articleOptions' })
                     ,dict(name='div', attrs={'class':'articleEmbeddedAdBox'})
                     ,dict(name='div', attrs={'class':'packagesGrpBox'})
                     ,dict(name='div', attrs={'id':'articleViewerGroup'})                     
                     ,dict(name='div', attrs={'class':'articlePosition2'})                     
                  ]
    
    feeds = [(u'News', u'http://feeds.contracostatimes.com/mngi/rss/CustomRssServlet/571/200818.xml')]
kiklop74 is offline   Reply With Quote