mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Added recipe for Security Watch (thanks to Oliver)
This commit is contained in:
parent
78e490ec8a
commit
dd6ab0957f
@ -984,4 +984,4 @@ def main(args=sys.argv):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(test())
|
||||
sys.exit(main())
|
||||
|
@ -15,7 +15,7 @@ recipe_modules = [
|
||||
'demorgen_be', 'de_standaard', 'ap', 'barrons', 'chr_mon', 'cnn', 'faznet',
|
||||
'jpost', 'jutarnji', 'nasa', 'reuters', 'spiegelde', 'wash_post', 'zeitde',
|
||||
'blic', 'novosti', 'danas', 'vreme', 'times_online', 'the_scotsman',
|
||||
'nytimes_sub'
|
||||
'nytimes_sub', 'security_watch'
|
||||
]
|
||||
|
||||
import re, imp, inspect, time, os
|
||||
|
31
src/calibre/web/feeds/recipes/security_watch.py
Normal file
31
src/calibre/web/feeds/recipes/security_watch.py
Normal file
@ -0,0 +1,31 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class SecurityWatch(BasicNewsRecipe):
|
||||
title = u'securitywatch'
|
||||
description = 'security news'
|
||||
timefmt = ' [%d %b %Y]'
|
||||
__author__ = 'Oliver'
|
||||
no_stylesheets = True
|
||||
oldest_article = 14
|
||||
max_articles_per_feed = 100
|
||||
use_embedded_content = False
|
||||
filter_regexps = [r'feedads\.googleadservices\.com']
|
||||
filter_regexps = [r'ad\.doubleclick']
|
||||
filter_regexps = [r'advert']
|
||||
|
||||
remove_tags = [dict(id='topBannerContainer'),
|
||||
dict(id='topBannerSmall'),
|
||||
dict(id='topSearchBar'),
|
||||
dict(id='topSearchForm'),
|
||||
dict(id='rtBannerMPU'),
|
||||
dict(id='topNavBar'),
|
||||
dict(id='breadcrumbs'),
|
||||
#dict(id='entry-28272'),
|
||||
dict(id='topSearchLinks'),
|
||||
dict(name='span', attrs={'class':'date'})]
|
||||
|
||||
remove_tags_after = [dict(id='googlemp')]
|
||||
|
||||
feeds = [(u'securitywatch', u'http://feeds.ziffdavisenterprise.com/RSS/security_watch/')]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user