mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Boston Globe
This commit is contained in:
parent
39e41aac6b
commit
7c4b39173b
@ -16,7 +16,7 @@ class BostonGlobeSubscription(BasicNewsRecipe):
|
|||||||
__author__ = 'Rob Freundlich'
|
__author__ = 'Rob Freundlich'
|
||||||
description = 'Boston Globe with full articles for subscribers'
|
description = 'Boston Globe with full articles for subscribers'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
INDEX = 'http://www.bostonglobe.com/todayspaper/%Y/%m/%d'
|
INDEX = 'https://www.bostonglobe.com/todayspaper/%Y/%m/%d'
|
||||||
todaysDate = date.today().strftime("%d/%m/%Y")
|
todaysDate = date.today().strftime("%d/%m/%Y")
|
||||||
timefmt = ' [%a, %d %b, %Y]'
|
timefmt = ' [%a, %d %b, %Y]'
|
||||||
needs_subscription = 'optional'
|
needs_subscription = 'optional'
|
||||||
@ -107,9 +107,9 @@ class BostonGlobeSubscription(BasicNewsRecipe):
|
|||||||
for story in stories:
|
for story in stories:
|
||||||
h2 = story.find("h2", {"class": 'story-title'})
|
h2 = story.find("h2", {"class": 'story-title'})
|
||||||
link = story.find("a", {'class': 'story-perm'})
|
link = story.find("a", {'class': 'story-perm'})
|
||||||
for img in h2.findAll('img'):
|
|
||||||
img.extract()
|
|
||||||
if h2 is not None and link is not None:
|
if h2 is not None and link is not None:
|
||||||
|
for img in h2.findAll('img'):
|
||||||
|
img.extract()
|
||||||
title = self.tag_to_string(h2)
|
title = self.tag_to_string(h2)
|
||||||
url = self.absolutize_url(link["href"])
|
url = self.absolutize_url(link["href"])
|
||||||
excerpt_div = story.find("div", {"class": "excerpt"})
|
excerpt_div = story.find("div", {"class": "excerpt"})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user