diff --git a/resources/recipes/fudzilla.recipe b/resources/recipes/fudzilla.recipe index e7f3d99fe9..821488ad0a 100644 --- a/resources/recipes/fudzilla.recipe +++ b/resources/recipes/fudzilla.recipe @@ -1,27 +1,41 @@ #!/usr/bin/env python __license__ = 'GPL v3' -__copyright__ = '2008, Darko Miletic ' +__copyright__ = '2010 Starson17' ''' fudzilla.com ''' +import re from calibre.web.feeds.news import BasicNewsRecipe class Fudzilla(BasicNewsRecipe): title = u'Fudzilla' - __author__ = 'Darko Miletic' + __author__ = 'Starson17' language = 'en' description = 'Tech news' oldest_article = 7 + remove_javascript = True max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False - feeds = [ (u'Posts', u'http://www.fudzilla.com/index.php?option=com_rss&feed=RSS2.0&no_html=1')] - def print_version(self, url): - nurl = url.replace('http://www.fudzilla.com/index.php','http://www.fudzilla.com/index2.php') - nmain, nsep, nrest = nurl.partition('&Itemid=') - return nmain + '&pop=1&page=0&Itemid=1' + remove_tags_before = dict(name='div', attrs={'class':['padding']}) + + remove_tags = [dict(name='td', attrs={'class':['left','right']}), + dict(name='div', attrs={'id':['toolbar','buttons']}), + dict(name='div', attrs={'class':['artbannersxtd','back_button']}), + dict(name='span', attrs={'class':['pathway']}), + dict(name='th', attrs={'class':['pagenav_next','pagenav_prev']}), + dict(name='table', attrs={'class':['headlines']}), + ] + + feeds = [ + (u'Posts', u'http://www.fudzilla.com/index.php?option=com_rss&feed=RSS2.0&no_html=1') + ] + + preprocess_regexps = [ + (re.compile(r'

Welcome.*

', re.DOTALL|re.IGNORECASE), lambda match: '') + ]