mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
New recipe for Editor and Publisher by XanthanGum
This commit is contained in:
parent
427061d5b8
commit
801a40ff23
@ -119,6 +119,8 @@
|
||||
- title: stuff.co.nz
|
||||
author: Krittika Goyal
|
||||
|
||||
- title: Editor and Publisher
|
||||
author: XanthanGum
|
||||
|
||||
improved recipes:
|
||||
- Physics Today
|
||||
|
34
resources/recipes/editor_and_publisher.recipe
Normal file
34
resources/recipes/editor_and_publisher.recipe
Normal file
@ -0,0 +1,34 @@
|
||||
import re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class EandP(BasicNewsRecipe):
|
||||
title = u'Editor and Publisher'
|
||||
__author__ = u'Xanthan Gum'
|
||||
description = 'News about newspapers and journalism.'
|
||||
language = 'en'
|
||||
no_stylesheets = True
|
||||
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
|
||||
# Font formatting code borrowed from kwetal
|
||||
|
||||
extra_css = '''
|
||||
body{font-family:verdana,arial,helvetica,geneva,sans-serif ;}
|
||||
h1{font-size: xx-large;}
|
||||
h2{font-size: large;}
|
||||
'''
|
||||
|
||||
# Delete everything before the article
|
||||
|
||||
remove_tags_before = dict(name='font', attrs={'class':'titlebar_black'})
|
||||
|
||||
# Delete everything after the article
|
||||
|
||||
preprocess_regexps = [(re.compile(r'<!--endclickprintinclude-->.*</body>', re.DOTALL|re.IGNORECASE),
|
||||
lambda match: '</body>'),]
|
||||
|
||||
feeds = [(u'Breaking News', u'http://feeds.feedburner.com/EditorAndPublisher-BreakingNews'),
|
||||
(u'Business News', u'http://feeds.feedburner.com/EditorAndPublisher-BusinessNews'),
|
||||
(u'Newsroom', u'http://feeds.feedburner.com/EditorAndPublisher-Newsroom'),
|
||||
(u'Technology News', u'http://feeds.feedburner.com/EditorAndPublisher-Technology'),
|
||||
(u'Syndicates News', u'http://feeds.feedburner.com/EditorAndPublisher-Syndicates')]
|
Loading…
x
Reference in New Issue
Block a user