View Single Post
Old 07-01-2016, 12:20 PM   #5
steven.davis
Junior Member
steven.davis began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2016
Device: kindle fire hdx
Not sure if anyone is still tracking this but I updated the feeds and it seems to be working.
Code:
from calibre.web.feeds.news import BasicNewsRecipe
import re

class Skeptic(BasicNewsRecipe):
    title          = u'The Skeptic'
    description         = 'Discussions with leading experts and investigation of fringe science and paranormal claims.'
    language       = 'en'
    __author__     = 'Starson17'
    oldest_article = 31
    cover_url           = 'http://www.skeptricks.com/images/Skeptic_Magazine.jpg'
    remove_empty_feeds    = True
    remove_javascript   = True
    max_articles_per_feed = 50
    no_stylesheets = True

    remove_tags = [dict(name='div', attrs={'class':['Introduction','divider']}),
                  dict(name='div', attrs={'id':['feature', 'podcast']}),
                  dict(name='div', attrs={'id':re.compile(r'follow.*', re.DOTALL|re.IGNORECASE)}),
                  dict(name='hr'),
                  ]


    feeds = [
            ('The Skeptic', 'http://feeds.feedburner.com/Skepticcom'),
            ('E-Skeptic', 'http://www.skeptic.com/eskeptic')
            ]

    def get_browser(self):
        br = BasicNewsRecipe.get_browser(self)
        br.addheaders = [('Accept', 'text/html')]
        return br

    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
steven.davis is offline   Reply With Quote