mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update TOI and LiveMint
This commit is contained in:
parent
57fe3de98e
commit
e40e387c88
@ -17,6 +17,8 @@ class LiveMint(BasicNewsRecipe):
|
|||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_attributes = ['style', 'height', 'width']
|
remove_attributes = ['style', 'height', 'width']
|
||||||
|
masthead_url = 'https://images.livemint.com/static/livemint-logo-v1.svg'
|
||||||
|
cover_url = 'https://epsfs.hindustantimes.com/MINT/2022/04/06/Delhi/Delhi/5_01/9376f23b_01_mr.jpg'
|
||||||
|
|
||||||
if is_saturday:
|
if is_saturday:
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
|
@ -8,6 +8,12 @@ timesofindia.indiatimes.com
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
|
def classes(classes):
|
||||||
|
q = frozenset(classes.split(' '))
|
||||||
|
return dict(attrs={
|
||||||
|
'class': lambda x: x and frozenset(x.split()).intersection(q)})
|
||||||
|
|
||||||
|
|
||||||
class TheEconomicTimes(BasicNewsRecipe):
|
class TheEconomicTimes(BasicNewsRecipe):
|
||||||
title = 'The Times of India'
|
title = 'The Times of India'
|
||||||
__author__ = 'Karthik'
|
__author__ = 'Karthik'
|
||||||
@ -40,7 +46,9 @@ class TheEconomicTimes(BasicNewsRecipe):
|
|||||||
remove_tags_before = dict(name='h1')
|
remove_tags_before = dict(name='h1')
|
||||||
remove_tags_after = dict(name='div', attrs={'class': 'storycontent'})
|
remove_tags_after = dict(name='div', attrs={'class': 'storycontent'})
|
||||||
remove_attributes = ['xmlns', 'style']
|
remove_attributes = ['xmlns', 'style']
|
||||||
remove_tags = [dict(name='div', attrs={'class': 'readalso'})]
|
remove_tags = [
|
||||||
|
classes('readalso success_screen poll_withoutLogin hide')
|
||||||
|
]
|
||||||
|
|
||||||
feeds = [('Recent Stories', 'http://timesofindia.indiatimes.com/rssfeeds/1221656.cms'),
|
feeds = [('Recent Stories', 'http://timesofindia.indiatimes.com/rssfeeds/1221656.cms'),
|
||||||
('India', 'http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms'),
|
('India', 'http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user