mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Update New York Times Technology Beat
This commit is contained in:
parent
43cfbc7c26
commit
d7a4db942a
@ -5,9 +5,6 @@ from __future__ import with_statement
|
|||||||
__license__ = 'GPL 3'
|
__license__ = 'GPL 3'
|
||||||
__copyright__ = 'zotzo'
|
__copyright__ = 'zotzo'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
"""
|
|
||||||
http://pogue.blogs.nytimes.com/
|
|
||||||
"""
|
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
@ -15,25 +12,31 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
class NYTimesTechnology(BasicNewsRecipe):
|
class NYTimesTechnology(BasicNewsRecipe):
|
||||||
title = 'New York Times Technology Beat'
|
title = 'New York Times Technology Beat'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
__author__ = 'David Pogue'
|
|
||||||
description = 'The latest in technology from David Pogue'
|
description = 'The latest in technology from David Pogue'
|
||||||
publisher = 'The New York Times'
|
publisher = 'The New York Times'
|
||||||
category = 'Technology'
|
category = 'Technology'
|
||||||
oldest_article = 14
|
oldest_article = 14
|
||||||
max_articles_per_feed = 25
|
max_articles_per_feed = 25
|
||||||
|
remove_empty_feeds = True
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
language = 'en'
|
language = 'en'
|
||||||
cover_url ='http://bit.ly/g0SKJT'
|
cover_url ='http://bit.ly/g0SKJT'
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'News', u'http://pogue.blogs.nytimes.com/feed/'),
|
|
||||||
(u'Bits', u'http://bits.blogs.nytimes.com/feed/'),
|
(u'Bits', u'http://bits.blogs.nytimes.com/feed/'),
|
||||||
(u'Gadgetwise', u'http://gadgetwise.blogs.nytimes.com/feed/'),
|
(u'Gadgetwise', u'http://gadgetwise.blogs.nytimes.com/feed/'),
|
||||||
(u'Open', u'http://open.blogs.nytimes.com/feed/')
|
(u'Open', u'http://open.blogs.nytimes.com/feed/')
|
||||||
]
|
]
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'header'}),
|
keep_only_tags = [
|
||||||
|
dict(name='div', attrs={'id':['story-body', 'header', 'story-meta']}),
|
||||||
dict(name='h1'),
|
dict(name='h1'),
|
||||||
dict(name='h2'),
|
dict(name='h2'),
|
||||||
dict(name='div', attrs={'class':'entry-content'})]
|
dict(name='div', attrs={'class':'entry-content'})
|
||||||
|
]
|
||||||
|
remove_tags = [
|
||||||
|
dict(id='lede-ad'),
|
||||||
|
dict(attrs={'class':lambda x:x and 'ad' in x.split()}),
|
||||||
|
dict(attrs={'class':lambda x:x and 'nocontent' in x.split()}),
|
||||||
|
]
|
||||||
extra_css = '''
|
extra_css = '''
|
||||||
h1{font-family:Arial,Helvetica,sans-serif;
|
h1{font-family:Arial,Helvetica,sans-serif;
|
||||||
font-weight:bold;font-size:large;}
|
font-weight:bold;font-size:large;}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user