diff --git a/recipes/live_law.recipe b/recipes/live_law.recipe index e40f1d926f..be88e7fb7b 100644 --- a/recipes/live_law.recipe +++ b/recipes/live_law.recipe @@ -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', '') diff --git a/recipes/moneycontrol.recipe b/recipes/moneycontrol.recipe index 4fcc5c5760..2d4f60f8b1 100644 --- a/recipes/moneycontrol.recipe +++ b/recipes/moneycontrol.recipe @@ -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=''))) )