View Single Post
Old 03-28-2014, 05:46 PM   #3
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Pls. find an updated version below.

Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
Changelog:
2011-09-24
Changed cover (drMerry)
2011-10-13
Updated Cover (drMerry)
2014-03-28
Update by Armin Geller
news.cnet.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class CnetNews(BasicNewsRecipe):
    title                 = 'CNET News'
    __author__            = 'Darko Miletic updated by DrMerry.'
    description           = 'Tech news and business reports by CNET News. Focused on information technology, core topics include computers, hardware, software, networking, and Internet media.'
    publisher             = 'CNET'
    category              = 'news, IT, USA'
    encoding              = 'utf-8' #AGe 2014-03-28
    language              = 'en' #AGe 2014-03-28
    oldest_article        = 7
    max_articles_per_feed = 100

    cover_url = 'http://reviews.cnet.com/i/ff/wp/logo_cnet.gif'

    conversion_options = {
                          'comment'   : description
                        , 'tags'      : category
                        , 'publisher' : publisher
                        , 'language'  : language
                        }

    remove_tags = [                                                    #AGe 2014-03-28, new
                    dict(name='div', attrs={'class':'row controls'}),
                    dict(name='ul', attrs={'class':'sharebar inline-view'}),
                    dict(name='div', attrs={'id':'ob_holder'}),
                    dict(name='span', attrs={'class':'author-social'}),
                  ]
                  
    keep_only_tags = dict(name='article', attrs={'id':'article-body'}) #AGe 2014-03-28

    feeds = [
             (u'News', u'http://news.cnet.com/2547-1_3-0-20.xml'),
            ]


Ciao,
DivingDuck
Attached Files
File Type: zip CNET_News_AGe.zip (880 Bytes, 176 views)
Divingduck is offline   Reply With Quote