This commit is contained in:
Fabio Manganiello 2019-04-13 08:08:20 +00:00
parent 1ea6041dfa
commit 72f179cb7e

View file

@ -61,7 +61,7 @@ class HttpWebpagePlugin(Plugin):
if not response or not response.ok: if not response or not response.ok:
raise RuntimeError("Unable to parse content for {}: {}".format(url, response.reason)) raise RuntimeError("Unable to parse content for {}: {}".format(url, response.reason))
self.logger.info('Got response from Mercury API: {}'.format(response)) self.logger.info('Got response from Mercury API: {}'.format(response.text))
title = response.json().get('title', 'No_title_{}'.format(int(time.time()))) title = response.json().get('title', 'No_title_{}'.format(int(time.time())))
content = '<body style="{body_style}"><h1>{title}</h1>{content}</body>'.\ content = '<body style="{body_style}"><h1>{title}</h1>{content}</body>'.\
format(title=title, content=response.json()['content'], format(title=title, content=response.json()['content'],