From e4ea6f9e150faa238737a6424e539773bc484481 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Sep 2019 18:54:39 +0530 Subject: [PATCH] ... --- recipes/boston.com.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/boston.com.recipe b/recipes/boston.com.recipe index 51502ef33c..0bc9024029 100644 --- a/recipes/boston.com.recipe +++ b/recipes/boston.com.recipe @@ -1,6 +1,6 @@ import re from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag +from calibre.ebooks.BeautifulSoup import Tag, NavigableString from datetime import date, timedelta @@ -235,6 +235,9 @@ class BostonGlobeSubscription(BasicNewsRecipe): def preprocess_html(self, soup): body = soup.find('body') title = soup.find('title') + t = type('')(title.contents[0]).partition('-')[0].strip() + del title.contents[0] + title.contents.append(NavigableString(t)) title.name = 'h1' body.insert(0, title) images = soup.findAll("img")