Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2008, 05:36 PM   #1
ddavtian
Addict
ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.
 
Posts: 271
Karma: 332
Join Date: Nov 2003
Location: San Francisco, USA
Device: Sage, Elipsa, Oasis, Galaxy Tab 8U, S22U
Request for Recipe

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
ddavtian is offline   Reply With Quote
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
Advert
Old 11-24-2008, 02:43 AM   #3
ddavtian
Addict
ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.ddavtian has a complete set of Star Wars action figures.
 
Posts: 271
Karma: 332
Join Date: Nov 2003
Location: San Francisco, USA
Device: Sage, Elipsa, Oasis, Galaxy Tab 8U, S22U
Thanks a lot, it works very well!
ddavtian is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for recipe sumper Recipes 2 10-11-2010 02:25 AM
Recipe request please aessedai44 Recipes 2 10-06-2010 01:07 AM
Yet another Recipe request.. sherman Calibre 4 11-21-2008 04:42 AM
Request for Recipe girlperson1 Calibre 2 11-14-2008 10:43 PM
Request for recipe girlperson1 Calibre 2 11-13-2008 10:03 PM


All times are GMT -4. The time now is 04:21 AM.


MobileRead.com is a privately owned, operated and funded community.