From 104614612f9add11ec780f2efb5222dc19a991dc Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sun, 4 Aug 2024 09:21:12 +0530 Subject: [PATCH 1/4] Update Bloomberg --- recipes/bloomberg-business-week.recipe | 4 ++-- recipes/bloomberg.recipe | 7 +++++-- recipes/wsj.recipe | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/recipes/bloomberg-business-week.recipe b/recipes/bloomberg-business-week.recipe index d43bc0cd86..8d3753fc20 100644 --- a/recipes/bloomberg-business-week.recipe +++ b/recipes/bloomberg-business-week.recipe @@ -68,10 +68,10 @@ class Bloomberg(BasicNewsRecipe): } remove_tags = [ - dict(name=['button', 'svg', 'meta']), + dict(name=['button', 'svg', 'meta', 'iframe']), dict(name='div', attrs={'id':['bb-that', 'bb-nav']}), dict(attrs={'data-image-type':'audio'}), - classes('twitter-logo bb-global-footer __sticky__audio__bar__portal__ css--social-wrapper-outer') + classes('twitter-logo bb-global-footer __sticky__audio__bar__portal__ css--social-wrapper-outer bplayer-container') ] extra_css = ''' diff --git a/recipes/bloomberg.recipe b/recipes/bloomberg.recipe index 656a9aa9fe..e2bc3f3831 100644 --- a/recipes/bloomberg.recipe +++ b/recipes/bloomberg.recipe @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + import json import time from datetime import datetime, timedelta @@ -61,10 +64,10 @@ class Bloomberg(BasicNewsRecipe): cover_url = 'https://assets.bwbx.io/images/users/iqjWHBFdfxIU/ivUxvlPidC3M/v0/600x-1.jpg' remove_tags = [ - dict(name=['button', 'svg', 'meta']), + dict(name=['button', 'svg', 'meta', 'iframe']), dict(name='div', attrs={'id':['bb-that', 'bb-nav']}), dict(attrs={'data-image-type':'audio'}), - classes('twitter-logo bb-global-footer __sticky__audio__bar__portal__ css--social-wrapper-outer') + classes('twitter-logo bb-global-footer __sticky__audio__bar__portal__ css--social-wrapper-outer bplayer-container') ] extra_css = ''' diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 24e6e50fea..c41e114a96 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -28,7 +28,7 @@ class WSJ(BasicNewsRecipe): title = 'The Wall Street Journal' __author__ = 'unkn0wn' description = ( - 'The Wall Street Journal is your source for breaking news, analysis and insights from the U.S. and ' + 'The Print Edition of WSJ. The Wall Street Journal is your source for breaking news, analysis and insights from the U.S. and ' 'around the world, the world\'s leading business and finance publication.' ) language = 'en_US' From b49eed0582d967fb6bd4cc08fa837637412b25d5 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sun, 4 Aug 2024 09:21:30 +0530 Subject: [PATCH 2/4] ... --- recipes/hindu.recipe | 2 +- recipes/hindustan_times_print.recipe | 2 +- recipes/liberation.recipe | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/hindu.recipe b/recipes/hindu.recipe index 4dbb83bed2..beef09b995 100644 --- a/recipes/hindu.recipe +++ b/recipes/hindu.recipe @@ -34,7 +34,7 @@ class TheHindu(BasicNewsRecipe): recipe_specific_options = { 'location': { 'short': 'The name of the local edition', - 'long': ('If The Hindu is available in your local town/city,\n' + 'long': ('If The Hindu is available in your local town/city, ' 'set this to your location, for example, hyderabad\n' 'Available Editions: bengaluru, chennai, coimbatore, delhi, ' 'erode, hyderabad, international, kochi, kolkata,\n' diff --git a/recipes/hindustan_times_print.recipe b/recipes/hindustan_times_print.recipe index a378f777fc..e90d28a446 100644 --- a/recipes/hindustan_times_print.recipe +++ b/recipes/hindustan_times_print.recipe @@ -26,7 +26,7 @@ class ht(BasicNewsRecipe): recipe_specific_options = { 'location': { 'short': 'The name of the local edition', - 'long': ('If The Hindustan Times is available in your local town/city,\n' + 'long': ('If The Hindustan Times is available in your local town/city, ' 'set this to your location, for example, Delhi\nAvailable Editions:' 'Delhi, Mumbai, Chandigarh, Lucknow, Patna, Bengaluru, Pune, Gurgaon,' 'Ludhiana, Rajasthan, Amritsar,\nEast UP, Haryana, Jammu, Navi Mumbai,' diff --git a/recipes/liberation.recipe b/recipes/liberation.recipe index a8d072ad7a..3765fabaad 100644 --- a/recipes/liberation.recipe +++ b/recipes/liberation.recipe @@ -21,9 +21,9 @@ def resize(x): return v m_fr = { - 1: 'janvier', 2: 'février', 3: 'mars', 4: 'avril', - 5: 'mai', 6: 'juin', 7: 'juillet', 8: 'août', - 9: 'septembre', 10: 'octobre', 11: 'novembre', 12: 'décembre' + 1: 'Janvier', 2: 'Février', 3: 'Mars', 4: 'Avril', + 5: 'Mai', 6: 'Juin', 7: 'Juillet', 8: 'Août', + 9: 'Septembre', 10: 'Octobre', 11: 'Novembre', 12: 'Décembre' } def json_to_html(raw): @@ -34,7 +34,7 @@ def json_to_html(raw): auth = '

{}

\n' dt = datetime.fromisoformat(data['last_updated_date'][:-1]) + timedelta(seconds=time.timezone) - dt = dt.strftime('%d ' + m_fr[dt.month] + ' %Y') + dt = dt.strftime(m_fr[dt.month] + '%d, %Y') a = [x['name'] for x in data['credits']['by']] if a: auth = auth.format(', '.join(a) + ' | ' + dt) @@ -86,6 +86,7 @@ class Liberation(BasicNewsRecipe): oldest_article = 1.15 remove_empty_feeds = True articles_are_obfuscated = True + timefmt = '[ %s]' % datetime.now().strftime(m_fr[datetime.now().month] '%d, %Y') ignore_duplicate_articles = {'title', 'url'} key = 'ZWplZVBlaW5nZWl0YWVnaG8zd2VlbmdlZXlvaHB1' masthead_url = 'https://journal.liberation.fr/img/logo.svg' From 99d53aa6fc0a5aeff360e386a8994fb735cb7705 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Sun, 4 Aug 2024 09:22:18 +0530 Subject: [PATCH 3/4] remove the_athletic --- recipes/icons/the_athletic.png | Bin 377 -> 0 bytes recipes/the_athletic.recipe | 52 --------------------------------- 2 files changed, 52 deletions(-) delete mode 100644 recipes/icons/the_athletic.png delete mode 100644 recipes/the_athletic.recipe diff --git a/recipes/icons/the_athletic.png b/recipes/icons/the_athletic.png deleted file mode 100644 index e5c22f2f0ac8cf0af71615fd52cb8693107a4461..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 377 zcmV-<0fzpGP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy_en%SR5;6H5F`K?2A2YrJz%f`rvjb-5MWD4!9-jNH16C5D|jr7 z(~<5FBfN1cnEn6%>zDuk&&Q=e^!5M$b7uVi|4s~tf>5CG9xgy45{H77|NlP_5(2t( zEp`Rcpa1{w6BO+F|NpBjRt3pG!>t4b&45%oRt4Mt|Nk}x2)_LPzZ;tZ<)8oI;I|qU z1%>~SKq(dlN0Akr#8jaB_y7MAF)%3j|Nox>hJyP4|9>e%m Date: Sun, 4 Aug 2024 09:22:37 +0530 Subject: [PATCH 4/4] Update indian_express.recipe fix cover --- recipes/indian_express.recipe | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/indian_express.recipe b/recipes/indian_express.recipe index 1e3b6c2b13..9274368581 100644 --- a/recipes/indian_express.recipe +++ b/recipes/indian_express.recipe @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 from datetime import datetime, timedelta from calibre.utils.date import parse_date @@ -116,10 +118,10 @@ class IndianExpress(BasicNewsRecipe): def get_cover_url(self): soup = self.index_to_soup( - 'https://www.magzter.com/IN/The-Indian-Express-Ltd./The-Indian-Express-Mumbai/Newspaper/' + 'https://www.readwhere.com/newspaper/indian-express/Nagpur/38726' ) - for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')): - return citem['content'] + citem = soup.find('meta', attrs={'property':'og:image'}) + return citem['content'].replace('300', '600') def preprocess_html(self, soup): if h2 := soup.find('h2'):