mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Stars and Stripes by adoucette
This commit is contained in:
parent
a24efae85c
commit
271f454806
33
recipes/stars_and_stripes.recipe
Normal file
33
recipes/stars_and_stripes.recipe
Normal file
@ -0,0 +1,33 @@
|
||||
''' Stars and Stripes
|
||||
'''
|
||||
|
||||
|
||||
import re
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
|
||||
|
||||
class AdvancedUserRecipe1308791026(BasicNewsRecipe):
|
||||
title = u'Stars and Stripes'
|
||||
oldest_article = 3
|
||||
max_articles_per_feed = 100
|
||||
__author__ = 'adoucette'
|
||||
description = 'The U.S. militarys independent news source, featuring exclusive reports from Iraq, Afghanistan, Europe and the Far East.'
|
||||
no_stylesheets = True
|
||||
#delay = 1
|
||||
use_embedded_content = False
|
||||
encoding = 'utf8'
|
||||
publisher = 'stripes.com'
|
||||
category = 'news, US, world'
|
||||
language = 'en_US'
|
||||
publication_type = 'newsportal'
|
||||
preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
|
||||
conversion_options = {
|
||||
'comments' : description
|
||||
,'tags' : category
|
||||
,'language' : language
|
||||
,'publisher' : publisher
|
||||
,'linearize_tables': True
|
||||
}
|
||||
keep_only_tags = [dict(name='div', attrs={'class':['element article']})]
|
||||
remove_tags_after = [dict(name='ul', attrs={'class':'inline-bookmarks'})]
|
||||
feeds = [(u'News', u'http://feeds.stripes.com/starsandstripes/news'), (u'Sports', u'http://feeds.stripes.com/starsandstripes/sports'), (u'Military Life', u'http://feeds.stripes.com/starsandstripes/militarylife'), (u'Opinion', u'http://feeds.stripes.com/starsandstripes/opinion'), (u'Travel', u'http://feeds.stripes.com/starsandstripes/travel')]
|
Loading…
x
Reference in New Issue
Block a user