MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / add

Function add

agents/reading-agent/main.py:1619–1622  ·  view source on GitHub ↗
(candidate: str)

Source from the content-addressed store, hash-verified

1617
1618 def add(candidate: str) -> None:
1619 cleaned = _clean_text(candidate)
1620 if cleaned.startswith(("http://", "https://")) and cleaned not in candidates:
1621 candidates.append(cleaned)
1622
1623 if "nature.com" in host and path.startswith("/articles/") and not path.lower().endswith(".pdf"):
1624 add(urljoin(f"{parsed.scheme}://{parsed.netloc}", f"{path}_reference.pdf"))
1625 add(urljoin(f"{parsed.scheme}://{parsed.netloc}", f"{path}.pdf"))

Calls 2

_looks_like_pdf_urlFunction · 0.85
_clean_textFunction · 0.70

Tested by

no test coverage detected