View Single Post
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