fix bug in case no outlinks are found, make brozzler.browser.browse_page() return an empty set instead of a set with one element which is an empty string {''}

This commit is contained in:
Noah Levitt 2016-06-22 17:43:53 +00:00
parent d198a69e45
commit 2038598f41
2 changed files with 3 additions and 2 deletions

View File

@ -408,7 +408,8 @@ compileOutlinks(window).join(' ');
self._waiting_on_scroll_to_top_msg_id = None self._waiting_on_scroll_to_top_msg_id = None
elif message["id"] == self._waiting_on_outlinks_msg_id: elif message["id"] == self._waiting_on_outlinks_msg_id:
self.logger.debug("got outlinks message=%s", message) self.logger.debug("got outlinks message=%s", message)
self._outlinks = frozenset(message["result"]["result"]["value"].split(" ")) self._outlinks = frozenset(
message["result"]["result"]["value"].split())
elif message["id"] == self._waiting_on_document_url_msg_id: elif message["id"] == self._waiting_on_document_url_msg_id:
if message["result"]["result"]["value"] != self.url: if message["result"]["result"]["value"] != self.url:
if self.on_url_change: if self.on_url_change:

View File

@ -21,7 +21,7 @@ import glob
setuptools.setup( setuptools.setup(
name='brozzler', name='brozzler',
version='1.1.dev16', version='1.1.dev17',
description='Distributed web crawling with browsers', description='Distributed web crawling with browsers',
url='https://github.com/internetarchive/brozzler', url='https://github.com/internetarchive/brozzler',
author='Noah Levitt', author='Noah Levitt',