mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
3fd6c7f915
commit
a5ca38430b
@ -206,7 +206,7 @@ class Economist(BasicNewsRecipe):
|
|||||||
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
||||||
root = parse(raw)
|
root = parse(raw)
|
||||||
if '/interactive/' in url:
|
if '/interactive/' in url:
|
||||||
return '<html><body><article><h1>' + root.xpath('//h1')[0].text + '</h1><em>' \
|
return '<html><body><article><h1 class="headline">' + root.xpath('//h1')[0].text + '</h1><em>' \
|
||||||
+ 'This article is supposed to be read in a browser' \
|
+ 'This article is supposed to be read in a browser' \
|
||||||
+ '</em></article></body></html>'
|
+ '</em></article></body></html>'
|
||||||
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
||||||
|
@ -206,7 +206,7 @@ class Economist(BasicNewsRecipe):
|
|||||||
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
||||||
root = parse(raw)
|
root = parse(raw)
|
||||||
if '/interactive/' in url:
|
if '/interactive/' in url:
|
||||||
return '<html><body><article><h1>' + root.xpath('//h1')[0].text + '</h1><em>' \
|
return '<html><body><article><h1 class="headline">' + root.xpath('//h1')[0].text + '</h1><em>' \
|
||||||
+ 'This article is supposed to be read in a browser' \
|
+ 'This article is supposed to be read in a browser' \
|
||||||
+ '</em></article></body></html>'
|
+ '</em></article></body></html>'
|
||||||
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
||||||
|
@ -202,7 +202,7 @@ class Economist(BasicNewsRecipe):
|
|||||||
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
|
||||||
root = parse(raw)
|
root = parse(raw)
|
||||||
if '/interactive/' in url:
|
if '/interactive/' in url:
|
||||||
return '<html><body><article><h1>' + root.xpath('//h1')[0].text + '</h1><em>' \
|
return '<html><body><article><h1 class="headline">' + root.xpath('//h1')[0].text + '</h1><em>' \
|
||||||
+ 'This article is supposed to be read in a browser' \
|
+ 'This article is supposed to be read in a browser' \
|
||||||
+ '</em></article></body></html>'
|
+ '</em></article></body></html>'
|
||||||
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
script = root.xpath('//script[@id="__NEXT_DATA__"]')
|
||||||
|
@ -81,6 +81,7 @@ class ft(BasicNewsRecipe):
|
|||||||
open = open_novisit
|
open = open_novisit
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
|
('FirstFT', 'https://www.ft.com/firstft?format=rss'),
|
||||||
('Opinion', 'https://www.ft.com/opinion?format=rss'),
|
('Opinion', 'https://www.ft.com/opinion?format=rss'),
|
||||||
('World', 'https://www.ft.com/world?format=rss'),
|
('World', 'https://www.ft.com/world?format=rss'),
|
||||||
('US', 'https://www.ft.com/us?format=rss'),
|
('US', 'https://www.ft.com/us?format=rss'),
|
||||||
@ -90,6 +91,7 @@ class ft(BasicNewsRecipe):
|
|||||||
('Climate', 'https://www.ft.com/climate-capital?format=rss'),
|
('Climate', 'https://www.ft.com/climate-capital?format=rss'),
|
||||||
('Life & Arts', 'https://www.ft.com/life-arts?format=rss'),
|
('Life & Arts', 'https://www.ft.com/life-arts?format=rss'),
|
||||||
('How to spend it', 'https://www.ft.com/htsi?format=rss'),
|
('How to spend it', 'https://www.ft.com/htsi?format=rss'),
|
||||||
|
('Others', 'https://www.ft.com/rss/home/uk')
|
||||||
]
|
]
|
||||||
|
|
||||||
def preprocess_raw_html(self, raw, *a):
|
def preprocess_raw_html(self, raw, *a):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user