From 08608b189b3278375ddabad6335eb2133bb82cb9 Mon Sep 17 00:00:00 2001 From: LAntoine Date: Sat, 13 Jul 2024 17:25:46 +0200 Subject: [PATCH] Fix Bloomberg * Handle Google news cookies --- recipes/bloomberg.recipe | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/bloomberg.recipe b/recipes/bloomberg.recipe index 51c2eeaa78..9c62f4871b 100644 --- a/recipes/bloomberg.recipe +++ b/recipes/bloomberg.recipe @@ -207,3 +207,11 @@ class Bloomberg(BasicNewsRecipe): article.summary = self.tag_to_string(soup.find('div', attrs={'class':'subhead'})) article.text_summary = self.tag_to_string(soup.find('div', attrs={'class':'subhead'})) article.title = article.title.replace(' - Bloomberg', '') + + def get_browser(self): + # -- Handle Google's cookies consent page + br = BasicNewsRecipe.get_browser(self) + br.open('https://news.google.com') + br.select_form(action="https://consent.google.com/save") + br.submit() + return br