From fde26758be46f19edf68fc4e024a4c238e12cfeb Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 22 Dec 2018 10:31:52 +0100 Subject: Fix recursive mode’s URL parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Broken by commit 5e444dd6511d97308a84ae9c86ebf14547d01f01. URL’s read from stdin must be converted from str. --- crocoite/controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crocoite') diff --git a/crocoite/controller.py b/crocoite/controller.py index 435f979..53cb08d 100644 --- a/crocoite/controller.py +++ b/crocoite/controller.py @@ -27,6 +27,7 @@ import tempfile, asyncio, json, os from itertools import islice from datetime import datetime from operator import attrgetter +from yarl import URL from . import behavior as cbehavior from .browser import SiteLoader, Item @@ -336,7 +337,7 @@ class RecursiveController: data = json.loads (data) uuid = data.get ('uuid') if uuid == '8ee5e9c9-1130-4c5c-88ff-718508546e0c': - links = set (self.policy (map (lambda x: x.with_fragment(None), data.get ('links', [])))) + links = set (self.policy (map (lambda x: URL(x).with_fragment(None), data.get ('links', [])))) links.difference_update (self.have) self.pending.update (links) elif uuid == '24d92d16-770e-4088-b769-4020e127a7ff': -- cgit v1.2.3