mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
15dd52d0f1
commit
215513510f
@ -16,6 +16,7 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
oldest_article = 1 # days
|
||||
|
||||
extra_css = '''
|
||||
img {display:block; margin:0 auto;}
|
||||
@ -65,7 +66,7 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
|
||||
feeds = []
|
||||
|
||||
when = 27 # hours
|
||||
when = oldest_article*24
|
||||
index = 'https://www.moneycontrol.com/'
|
||||
|
||||
business_sections = [
|
||||
@ -73,12 +74,12 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
'personal-finance', 'commodities', 'trade', 'companies'
|
||||
]
|
||||
|
||||
a = 'https://news.google.com/rss/search?q=when:{}h+allinurl:{}{}&hl=en-IN&gl=IN&ceid=IN:en'
|
||||
a = 'https://news.google.com/rss/search?q=when:{}h+allinurl:{}&hl=en-IN&gl=IN&ceid=IN:en'
|
||||
|
||||
for sec in business_sections:
|
||||
allinurl_a = index + 'news/business'
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(allinurl_a, safe=''), '%2F' + sec + '%2F')))
|
||||
feeds.append(('Business' , a.format(when, quote(allinurl_a, safe=''), '')))
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(allinurl_a + sec, safe=''))))
|
||||
feeds.append(('Business' , a.format(when, quote(allinurl_a + sec, safe=''))))
|
||||
|
||||
news_sections = [
|
||||
'india', 'world', 'opinion', 'politics', 'technology', 'trends', 'lifestyle'
|
||||
@ -86,8 +87,8 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
|
||||
for sec in news_sections:
|
||||
allinurl_b = index + 'news'
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(allinurl_b, safe=''), '%2F' + sec + '%2F')))
|
||||
feeds.append(('News', a.format(when, quote(allinurl_b, safe=''), '')))
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(allinurl_b + sec, safe=''))))
|
||||
feeds.append(('News', a.format(when, quote(allinurl_b + sec, safe=''), '')))
|
||||
feeds.append(
|
||||
('Others', 'https://news.google.com/rss/search?q=when:{}h+allinurl:{}&hl=en-IN&gl=IN&ceid=IN:en'.format(when, quote(index, safe='')))
|
||||
)
|
||||
|
@ -24,6 +24,7 @@ class TheWeek(BasicNewsRecipe):
|
||||
remove_empty_feeds = True
|
||||
resolve_internal_links = True
|
||||
simultaneous_downloads = 1
|
||||
oldest_article = 7 # days
|
||||
web_url = ''
|
||||
|
||||
extra_css = '''
|
||||
@ -74,7 +75,7 @@ class TheWeek(BasicNewsRecipe):
|
||||
return soup
|
||||
|
||||
feeds = []
|
||||
when = '168' # hours (7 days)
|
||||
when = oldest_article*24
|
||||
index = 'https://theweek.com/'
|
||||
sections = [
|
||||
'politics', 'news', 'cartoons', 'tech', 'science', 'health',
|
||||
|
Loading…
x
Reference in New Issue
Block a user