This commit is contained in:
unkn0w7n 2024-01-30 09:44:39 +05:30
parent 3fd6c7f915
commit a5ca38430b
4 changed files with 5 additions and 3 deletions

View File

@ -206,7 +206,7 @@ class Economist(BasicNewsRecipe):
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
root = parse(raw)
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' \
+ '</em></article></body></html>'
script = root.xpath('//script[@id="__NEXT_DATA__"]')

View File

@ -206,7 +206,7 @@ class Economist(BasicNewsRecipe):
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
root = parse(raw)
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' \
+ '</em></article></body></html>'
script = root.xpath('//script[@id="__NEXT_DATA__"]')

View File

@ -202,7 +202,7 @@ class Economist(BasicNewsRecipe):
# open('/t/raw.html', 'wb').write(raw.encode('utf-8'))
root = parse(raw)
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' \
+ '</em></article></body></html>'
script = root.xpath('//script[@id="__NEXT_DATA__"]')

View File

@ -81,6 +81,7 @@ class ft(BasicNewsRecipe):
open = open_novisit
feeds = [
('FirstFT', 'https://www.ft.com/firstft?format=rss'),
('Opinion', 'https://www.ft.com/opinion?format=rss'),
('World', 'https://www.ft.com/world?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'),
('Life & Arts', 'https://www.ft.com/life-arts?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):