mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix Fudzilla
This commit is contained in:
parent
bac7e6b78c
commit
c7e8c889a4
@ -1,27 +1,41 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2010 Starson17'
|
||||||
'''
|
'''
|
||||||
fudzilla.com
|
fudzilla.com
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class Fudzilla(BasicNewsRecipe):
|
class Fudzilla(BasicNewsRecipe):
|
||||||
title = u'Fudzilla'
|
title = u'Fudzilla'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Starson17'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
|
||||||
description = 'Tech news'
|
description = 'Tech news'
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
|
remove_javascript = True
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
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):
|
remove_tags_before = dict(name='div', attrs={'class':['padding']})
|
||||||
nurl = url.replace('http://www.fudzilla.com/index.php','http://www.fudzilla.com/index2.php')
|
|
||||||
nmain, nsep, nrest = nurl.partition('&Itemid=')
|
remove_tags = [dict(name='td', attrs={'class':['left','right']}),
|
||||||
return nmain + '&pop=1&page=0&Itemid=1'
|
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'<p class="MsoNormal"> Welcome.*</p> ', re.DOTALL|re.IGNORECASE), lambda match: '')
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user