Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2008, 04:35 PM   #1
GPThomson
Junior Member
GPThomson began at the beginning.
 
GPThomson's Avatar
 
Posts: 5
Karma: 10
Join Date: Jul 2008
Location: Europe
Device: Sony Portable Reader PRS-505
Request for Recipes

Hello,

First of all I would like to thanks Kovid and the other developers of calibre for their great work. This is really a great program.

I have to say that my skills in programming are rather limited and although I tried by myself to create some recipes by following the tutorial, I was not able to get a satisfactory result for the following newspapers:

De Morgen: http://www.demorgen.be/dm/nl/1361/rs...rssFeeds.dhtml

De Standaard: http://feeds.feedburner.com/dso-front

I would greatly appreciate some help here. I hope that the fact that it is in Dutch does not make it too difficult.

Cheers!
GPThomson is offline   Reply With Quote
Old 11-19-2008, 07:27 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 GPThomson View Post
Here goes first:

Code:
#!/usr/bin/env  python

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

from calibre.web.feeds.news import BasicNewsRecipe

class dmg(BasicNewsRecipe):
    title                 = u'DeMorgen.be'
    __author__            = u'Darko Miletic'
    description           = u'news from Belgium'    
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False

    keep_only_tags    = [dict(name='div' , attrs={'class':'art_box2'})]

    feeds          = [  
                       (u'Nieuws'             , u'http://www.demorgen.be/nieuws/rss.xml'          )
                      ,(u'De Gedachte'        , u'http://www.demorgen.be/degedachte/rss.xml'      )
                      ,(u'Financiele morgen'  , u'http://www.demorgen.be/financielemorgen/rss.xml')
                      ,(u'Financiele morgen'  , u'http://www.demorgen.be/financielemorgen/rss.xml')
                      ,(u'Sport'              , u'http://www.demorgen.be/sport/rss.xml'           )
                      ,(u'Bis'                , u'http://www.demorgen.be/bis/rss.xml'             )
                      ,(u'Magazine'           , u'http://www.demorgen.be/magazine/rss.xml'        )
                      ,(u'De stand der dingen', u'http://www.demorgen.be/standderdingen/rss.xml'  )                         
                     ]

Quote:
Originally Posted by GPThomson View Post
This one was a bit harder to do:

Code:
#!/usr/bin/env  python

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

from calibre.web.feeds.news import BasicNewsRecipe

class Destandaard(BasicNewsRecipe):
    title                 = u'De Standaard'
    __author__            = u'Darko Miletic'
    description           = u'news from Belgium'    
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False

    keep_only_tags    = [dict(name='div' , attrs={'id':'_parts_midContainer_div'})]
    remove_tags_after  = dict(name='h3', attrs={'title':'Binnenland'})
    remove_tags = [
                     dict(name='h3'  , attrs={'title':'Binnenland'   })
                    ,dict(name='p'   , attrs={'class':'by'           })
                    ,dict(name='div' , attrs={'class':'articlesright'})
                    ,dict(name='a'   , attrs={'class':'help'         })
                    ,dict(name='a'   , attrs={'class':'archive'      })
                    ,dict(name='a'   , attrs={'class':'print'        })
                    ,dict(name='a'   , attrs={'class':'email'        })
                  ]
    
    feeds          = [  
                       (u'De Standaard Online', u'http://feeds.feedburner.com/dso-front')
                     ]
kiklop74 is offline   Reply With Quote
Advert
Old 11-21-2008, 12:19 PM   #3
GPThomson
Junior Member
GPThomson began at the beginning.
 
GPThomson's Avatar
 
Posts: 5
Karma: 10
Join Date: Jul 2008
Location: Europe
Device: Sony Portable Reader PRS-505
Thumbs up

Thanks a lot Kiklop!

Dutch is a rather difficult language to learn and for me a good way to improve is be reading newspapers. Thanks to you I'll now be able to do so on my reader!

Cheers!
GPThomson is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for recipes of sites with no rss PipSqueak Recipes 1 10-16-2010 10:05 PM
Where my recipes are kept? bthoven Calibre 6 02-26-2010 12:20 AM
Help with RSS recipes fmma Calibre 1 06-15-2009 11:51 AM
Request for recipes mccande Calibre 4 12-26-2008 01:05 AM
Request for Recipes girlperson1 Calibre 4 11-12-2008 03:25 PM


All times are GMT -4. The time now is 02:53 AM.


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