From 91b4c9bbc32ae21b64b7e796b263127cbb242a81 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:49:03 +0530 Subject: [PATCH 1/2] Update Eenadu images fail without referer. --- recipes/eenadu.recipe | 7 +++++++ recipes/eenadu_ap.recipe | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/recipes/eenadu.recipe b/recipes/eenadu.recipe index 893dec36e0..c300469a4d 100644 --- a/recipes/eenadu.recipe +++ b/recipes/eenadu.recipe @@ -47,6 +47,13 @@ class eenadu_ts(BasicNewsRecipe): resolve_internal_links = True remove_empty_feeds = True + def get_browser(self, *args, **kw): + br = BasicNewsRecipe.get_browser(self, *args, **kw) + br.addheaders += [ + ('Referer', 'https://www.eenadu.net/') + ] + return br + def get_cover_url(self): import json from datetime import date diff --git a/recipes/eenadu_ap.recipe b/recipes/eenadu_ap.recipe index 9d77595042..6cb1a35b7d 100644 --- a/recipes/eenadu_ap.recipe +++ b/recipes/eenadu_ap.recipe @@ -47,6 +47,13 @@ class eenadu_ap(BasicNewsRecipe): resolve_internal_links = True remove_empty_feeds = True + def get_browser(self, *args, **kw): + br = BasicNewsRecipe.get_browser(self, *args, **kw) + br.addheaders += [ + ('Referer', 'https://www.eenadu.net/') + ] + return br + def get_cover_url(self): import json from datetime import date From 988a29bc6ce891511541e43a90ed12122c7bff8b Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:52:27 +0530 Subject: [PATCH 2/2] ... --- recipes/eenadu.recipe | 8 ++++---- recipes/eenadu_ap.recipe | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/eenadu.recipe b/recipes/eenadu.recipe index c300469a4d..8bb931aec9 100644 --- a/recipes/eenadu.recipe +++ b/recipes/eenadu.recipe @@ -101,10 +101,10 @@ class eenadu_ts(BasicNewsRecipe): ('ఆహా', 'recipes'), ('హాయ్ బుజ్జీ', 'kids-stories'), ('మకరందం', 'devotional'), - ('దేవతార్చన', 'temples'), - ('స్థిరాస్తి', 'real-estate'), - ('కథామృతం', 'kathalu'), - ('సండే మ్యాగజైన్', 'sunday-magazine') + ('దేవతార్చన', 'temples'), + ('స్థిరాస్తి', 'real-estate'), + ('కథామృతం', 'kathalu'), + ('సండే మ్యాగజైన్', 'sunday-magazine') ] for x in art_list: art_index = art + x[1] + '/' diff --git a/recipes/eenadu_ap.recipe b/recipes/eenadu_ap.recipe index 6cb1a35b7d..3f9f1f2673 100644 --- a/recipes/eenadu_ap.recipe +++ b/recipes/eenadu_ap.recipe @@ -101,10 +101,10 @@ class eenadu_ap(BasicNewsRecipe): ('ఆహా', 'recipes'), ('హాయ్ బుజ్జీ', 'kids-stories'), ('మకరందం', 'devotional'), - ('దేవతార్చన', 'temples'), - ('స్థిరాస్తి', 'real-estate'), - ('కథామృతం', 'kathalu'), - ('సండే మ్యాగజైన్', 'sunday-magazine') + ('దేవతార్చన', 'temples'), + ('స్థిరాస్తి', 'real-estate'), + ('కథామృతం', 'kathalu'), + ('సండే మ్యాగజైన్', 'sunday-magazine') ] for x in art_list: art_index = art + x[1] + '/'