diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-11 09:32:02 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-03-22 13:19:21 -0700 |
commit | ea6ccd227e0f62f5f9e7a66ba8bc90b18a2ca097 (patch) | |
tree | 31ccf1d938e2232ec1b24ab974a94d8b88cc6c4b /python/fatcat_tools/importers/ingest.py | |
parent | bc035f9237bfe5c64524f1bf67f3e549203c35b2 (diff) | |
download | fatcat-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.py | 10 |
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']}", |