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)