aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-24 14:46:24 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-24 14:46:24 -0700
commit135d262b3e92fc14d4e2572d4ea93f9980357c9b (patch)
treeca6366b85075254a4c45db0a5aeac6288df21a82 /python/fatcat_tools/importers
parentb1e26b8f2c53141d0cfed9199a771ff8f07926fd (diff)
downloadfatcat-135d262b3e92fc14d4e2572d4ea93f9980357c9b.tar.gz
fatcat-135d262b3e92fc14d4e2572d4ea93f9980357c9b.zip
fix existing updater
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/matched.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/matched.py b/python/fatcat_tools/importers/matched.py
index 1e154204..4da1d646 100644
--- a/python/fatcat_tools/importers/matched.py
+++ b/python/fatcat_tools/importers/matched.py
@@ -159,9 +159,10 @@ class MatchedImporter(EntityImporter):
# minimum viable "existing" URL cleanup to fix dupes and broken links:
# remove 'None' wayback URLs, and set archive.org rel 'archive'
existing.urls = [u for u in existing.urls if not ('://web.archive.org/web/None/' in u.url)]
- for u in existing.urls:
+ for i in len(existing.urls):
+ u = existing.urls[i]
if u.rel == 'repository' and '://archive.org/download/' in u.url:
- u.rel == 'archive'
+ existing.urls[i].rel == 'archive'
# merge the existing into this one and update
existing.urls = list(set([(u.rel, u.url) for u in fe.urls + existing.urls]))