mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-29 00:36:18 +00:00
tweak distill importer
This commit is contained in:
@@ -85,7 +85,8 @@ class import_distill_io_json(Importer):
|
||||
now = time.time()
|
||||
self.new_uuids=[]
|
||||
|
||||
|
||||
# @todo Use JSONSchema like in the API to validate here.
|
||||
|
||||
try:
|
||||
data = json.loads(data.strip())
|
||||
except json.decoder.JSONDecodeError:
|
||||
@@ -120,11 +121,8 @@ class import_distill_io_json(Importer):
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
# Does this need to be here anymore?
|
||||
if d.get('tags', False):
|
||||
extras['tags'] = ", ".join(d['tags'])
|
||||
|
||||
new_uuid = datastore.add_watch(url=d['uri'].strip(),
|
||||
tag=",".join(d.get('tags', [])),
|
||||
extras=extras,
|
||||
write_to_disk_now=False)
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ def test_import_distillio(client, live_server):
|
||||
# did the tags work?
|
||||
res = client.get( url_for("index"))
|
||||
|
||||
# check tags
|
||||
assert b"nice stuff" in res.data
|
||||
assert b"nerd-news" in res.data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user