diff --git a/platypush/plugins/http/webpage.py b/platypush/plugins/http/webpage.py index d4abca56d..5c1c1d153 100644 --- a/platypush/plugins/http/webpage.py +++ b/platypush/plugins/http/webpage.py @@ -61,6 +61,9 @@ class HttpWebpagePlugin(Plugin): if not response or not response.ok: raise RuntimeError("Unable to parse content for {}: {}".format(url, response.reason)) + if not len(response.text): + raise RuntimeError("Empty response from Mercury API for URL {}".format(url)) + self.logger.info('Got response from Mercury API: {}'.format(response.json())) title = response.json().get('title', 'No_title_{}'.format(int(time.time()))) content = '

{title}

{content}'.\