diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe index 75be28af39..920cc92332 100644 --- a/recipes/natgeo.recipe +++ b/recipes/natgeo.recipe @@ -41,6 +41,7 @@ def parse_lead_image(media): yield '
' + media['caption'] + '
' if 'credit' in media: yield '
' + media['credit'] + '
' + yield '

' def parse_body(item): @@ -124,6 +125,7 @@ class NatGeo(BasicNewsRecipe): masthead_url = 'https://i.natgeofe.com/n/e76f5368-6797-4794-b7f6-8d757c79ea5c/ng-logo-2fl.png?w=600&h=600' remove_empty_feeds = True resolve_internal_links = True + ignore_duplicate_articles = {'url'} extra_css = ''' .sub, blockquote { color:#404040; } @@ -171,5 +173,6 @@ class NatGeo(BasicNewsRecipe): def preprocess_html(self, soup): for img in soup.findAll('img', src=True): - img['src'] = img['src'] + '?w=700&h=700' + # for high res images use '?w=2000&h=2000' + img['src'] = img['src'] + '?w=1000&h=1000' return soup diff --git a/recipes/natgeohis.recipe b/recipes/natgeohis.recipe index e23c17859a..b5d74258b9 100644 --- a/recipes/natgeohis.recipe +++ b/recipes/natgeohis.recipe @@ -40,6 +40,7 @@ def parse_lead_image(media): yield '
' + media['caption'] + '
' if 'credit' in media: yield '
' + media['credit'] + '
' + yield '

' def parse_body(item): @@ -156,5 +157,6 @@ class NatGeo(BasicNewsRecipe): def preprocess_html(self, soup): for img in soup.findAll('img', src=True): + # for high res images use '?w=2000&h=2000' img['src'] = img['src'] + '?w=1000&h=1000' return soup diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe index 9089ae444d..bec1e910c0 100644 --- a/recipes/natgeomag.recipe +++ b/recipes/natgeomag.recipe @@ -45,6 +45,7 @@ def parse_lead_image(media): yield '
' + media['caption'] + '
' if 'credit' in media: yield '
' + media['credit'] + '
' + yield '

' def parse_body(item): @@ -175,5 +176,6 @@ class NatGeo(BasicNewsRecipe): def preprocess_html(self, soup): for img in soup.findAll('img', src=True): - img['src'] = img['src'] + '?w=1000&h=1000' + # for high res images use '?w=2000&h=2000' + img['src'] = img['src'] + '?w=1200&h=1200' return soup