mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
fc47eb7c68
@ -18,6 +18,8 @@ class livelaw(BasicNewsRecipe):
|
||||
remove_empty_feeds = True
|
||||
remove_javascript = True
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
simultaneous_downloads = 1
|
||||
art_url = ''
|
||||
|
||||
extra_css = '''
|
||||
.news_detail_person_detail {font-size:small; color:#202020;}
|
||||
@ -36,6 +38,7 @@ class livelaw(BasicNewsRecipe):
|
||||
if any(x in link for x in skip_sections):
|
||||
self.abort_article('skipping video links ', link)
|
||||
self.log('Found ', link)
|
||||
self.art_url = link
|
||||
html = br.open(link).read()
|
||||
return ({ 'data': html, 'url': link })
|
||||
|
||||
@ -75,4 +78,8 @@ class livelaw(BasicNewsRecipe):
|
||||
|
||||
for sec in sections:
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(index + sec, safe=''))))
|
||||
feeds.append(('Others' , a.format(when, quote(index + sec, safe=''))))
|
||||
feeds.append(('Others' , a.format(when, quote(index, safe=''))))
|
||||
|
||||
def populate_article_metadata(self, article, soup, first):
|
||||
article.url = self.art_url
|
||||
article.title = article.title.replace(' - Live Law - Indian Legal News', '')
|
||||
|
@ -79,7 +79,7 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
for sec in business_sections:
|
||||
allinurl_a = index + 'news/business'
|
||||
feeds.append((sec.capitalize(), a.format(when, quote(allinurl_a + sec, safe=''))))
|
||||
feeds.append(('Business' , a.format(when, quote(allinurl_a + sec, safe=''))))
|
||||
feeds.append(('Business' , a.format(when, quote(allinurl_a, safe=''))))
|
||||
|
||||
news_sections = [
|
||||
'india', 'world', 'opinion', 'politics', 'technology', 'trends', 'lifestyle'
|
||||
@ -88,7 +88,7 @@ class MoneyControlRecipe(BasicNewsRecipe):
|
||||
for sec in news_sections:
|
||||
allinurl_b = index + 'news'
|
||||
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(('News', a.format(when, quote(allinurl_b, 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='')))
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user