aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/ingest.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-02-11 09:32:02 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-03-22 13:19:21 -0700
commitea6ccd227e0f62f5f9e7a66ba8bc90b18a2ca097 (patch)
tree31ccf1d938e2232ec1b24ab974a94d8b88cc6c4b /python/fatcat_tools/importers/ingest.py
parentbc035f9237bfe5c64524f1bf67f3e549203c35b2 (diff)
downloadfatcat-ea6ccd227e0f62f5f9e7a66ba8bc90b18a2ca097.tar.gz
fatcat-ea6ccd227e0f62f5f9e7a66ba8bc90b18a2ca097.zip
dataset ingest: JSON object fixes
Diffstat (limited to 'python/fatcat_tools/importers/ingest.py')
-rw-r--r--python/fatcat_tools/importers/ingest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py
index 4f1cc3c4..62e0e854 100644
--- a/python/fatcat_tools/importers/ingest.py
+++ b/python/fatcat_tools/importers/ingest.py
@@ -675,9 +675,9 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
return True
def parse_fileset_urls(self, row: Dict[str, Any]) -> List[FilesetUrl]:
- if not row.get("strategy"):
+ if not row.get("ingest_strategy"):
return []
- strategy = row["strategy"]
+ strategy = row["ingest_strategy"]
urls = []
if strategy == "archiveorg-fileset" and row.get("archiveorg_item_name"):
urls.append(
@@ -686,7 +686,7 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
rel="archive-base",
)
)
- if row["strategy"].startswith("web-") and row.get("platform_base_url"):
+ if strategy.startswith("web-") and row.get("platform_base_url"):
urls.append(
fatcat_openapi_client.FilesetUrl(
url=f"https://web.archive.org/web/{row['web_base_url_dt']}/{row['web_base_url']}",
@@ -696,7 +696,7 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
# TODO: repository-base
# TODO: web-base
- if row["strategy"] == "archiveorg-fileset-bundle" and row.get("archiveorg_item_name"):
+ if strategy == "archiveorg-fileset-bundle" and row.get("archiveorg_item_name"):
urls.append(
fatcat_openapi_client.FilesetUrl(
url=f"https://archive.org/download/{row['archiveorg_item_name']}/{row['archiveorg_bundle_path']}",
@@ -704,7 +704,7 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
)
)
- if row["strategy"] == "web-fileset-bundle" and row.get("platform_bundle_url"):
+ if strategy == "web-fileset-bundle" and row.get("platform_bundle_url"):
urls.append(
fatcat_openapi_client.FilesetUrl(
url=f"https://web.archive.org/web/{row['web_bundle_url_dt']}/{row['web_bundle_url']}",