mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1938213 [recipe no longer works for downloading the free version of the Wall Street Journal](https://bugs.launchpad.net/calibre/+bug/1938213)
This commit is contained in:
parent
a81967e742
commit
96d5d5a764
@ -240,7 +240,8 @@ class WSJ(BasicNewsRecipe):
|
|||||||
break
|
break
|
||||||
|
|
||||||
feeds = []
|
feeds = []
|
||||||
for a in CSSSelect('.WSJTheme--nav-container--2qF6xQnZ .WSJTheme--section-link--3VznjgTM'):
|
for container in root.xpath('descendant::*[contains(@class, "WSJTheme--top-menu-item--")]'):
|
||||||
|
for a in container.xpath('descendant::a[contains(@class, "WSJTheme--section-link--")]'):
|
||||||
frontpage = a.get('href').endswith('frontpage')
|
frontpage = a.get('href').endswith('frontpage')
|
||||||
title = self.tag_to_string(a).capitalize().strip().replace('U.s.', 'U.S.')
|
title = self.tag_to_string(a).capitalize().strip().replace('U.s.', 'U.S.')
|
||||||
if not title:
|
if not title:
|
||||||
|
@ -240,7 +240,8 @@ class WSJ(BasicNewsRecipe):
|
|||||||
break
|
break
|
||||||
|
|
||||||
feeds = []
|
feeds = []
|
||||||
for a in CSSSelect('.WSJTheme--nav-container--2qF6xQnZ .WSJTheme--section-link--3VznjgTM'):
|
for container in root.xpath('descendant::*[contains(@class, "WSJTheme--top-menu-item--")]'):
|
||||||
|
for a in container.xpath('descendant::a[contains(@class, "WSJTheme--section-link--")]'):
|
||||||
frontpage = a.get('href').endswith('frontpage')
|
frontpage = a.get('href').endswith('frontpage')
|
||||||
title = self.tag_to_string(a).capitalize().strip().replace('U.s.', 'U.S.')
|
title = self.tag_to_string(a).capitalize().strip().replace('U.s.', 'U.S.')
|
||||||
if not title:
|
if not title:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user