mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Update New York Times Sports Beat
This commit is contained in:
parent
ceafc1b05e
commit
181a94fa7f
@ -32,22 +32,21 @@ class NYTimesSports(BasicNewsRecipe):
|
|||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
language = 'en'
|
language = 'en'
|
||||||
auto_cleanup = True
|
|
||||||
auto_cleanup_keep = '//div[@class="articleSpanImage"]'
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'The Fifth Down', u'http://fifthdown.blogs.nytimes.com/feed/'),
|
(u'The Fifth Down', u'https://fifthdown.blogs.nytimes.com/feed/'),
|
||||||
(u'Off The Dribble', u'http://offthedribble.blogs.nytimes.com/feed/'),
|
(u'The Quad', u'https://thequad.blogs.nytimes.com/feed/'),
|
||||||
(u'The Quad', u'http://thequad.blogs.nytimes.com/feed/'),
|
(u'Slap Shot', u'https://slapshot.blogs.nytimes.com/feed/'),
|
||||||
(u'Slap Shot', u'http://slapshot.blogs.nytimes.com/feed/'),
|
(u'Goal', u'https://goal.blogs.nytimes.com/feed/'),
|
||||||
(u'Goal', u'http://goal.blogs.nytimes.com/feed/'),
|
(u'Bats', u'https://bats.blogs.nytimes.com/feed/'),
|
||||||
(u'Bats', u'http://bats.blogs.nytimes.com/feed/'),
|
(u'Straight Sets', u'https://straightsets.blogs.nytimes.com/feed/'),
|
||||||
(u'Straight Sets', u'http://straightsets.blogs.nytimes.com/feed/'),
|
(u'Formula One', u'https://formulaone.blogs.nytimes.com/feed/'),
|
||||||
(u'Formula One', u'http://formulaone.blogs.nytimes.com/feed/'),
|
(u'On Par', u'https://onpar.blogs.nytimes.com/feed/'),
|
||||||
(u'On Par', u'http://onpar.blogs.nytimes.com/feed/'),
|
|
||||||
]
|
]
|
||||||
extra_css = '''
|
|
||||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
def preprocess_raw_html(self, raw_html, url):
|
||||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
if not hasattr(self, 'nyt_parser'):
|
||||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
from calibre.live import load_module
|
||||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
m = load_module('calibre.web.site_parsers.nytimes')
|
||||||
'''
|
self.nyt_parser = m
|
||||||
|
html = self.nyt_parser.extract_html(self.index_to_soup(raw_html))
|
||||||
|
return html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user