diff --git a/src/util.py b/src/util.py index cc454b6..4fe77b7 100644 --- a/src/util.py +++ b/src/util.py @@ -19,7 +19,7 @@ def dataframe_to_urlmap(df: pd.DataFrame) -> dict[httpx.URL, set[httpx.URL]]: :return: A dictionary where the key is a source URL, and the value is a set of target URLs. """ urlmap = {} - for source, target in zip(df["source"], df["target"], strict=True): + for source, target in zip(df.get("source", pd.Series()), df.get("target", pd.Series()), strict=True): source_url = httpx.URL(source) target_url = httpx.URL(target) if source_url not in urlmap: