summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-12-22 10:31:52 +0100
committerLars-Dominik Braun <lars@6xq.net>2018-12-22 10:31:52 +0100
commitfde26758be46f19edf68fc4e024a4c238e12cfeb (patch)
tree575af95291fb330514a38e68503ca8b24fdb030e /crocoite
parent0b83e60c0b637ee4c9b7f2299dba8742e6b8fc5a (diff)
downloadcrocoite-fde26758be46f19edf68fc4e024a4c238e12cfeb.tar.gz
crocoite-fde26758be46f19edf68fc4e024a4c238e12cfeb.tar.bz2
crocoite-fde26758be46f19edf68fc4e024a4c238e12cfeb.zip
Fix recursive mode’s URL parsing
Broken by commit 5e444dd6511d97308a84ae9c86ebf14547d01f01. URL’s read from stdin must be converted from str.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/controller.py3
1 files changed, 2 insertions, 1 deletions
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':