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

Function _looks_like_pdf_url

agents/reading-agent/main.py:1561–1571  ·  view source on GitHub ↗
(candidate: Any)

Source from the content-addressed store, hash-verified

1559
1560
1561def _looks_like_pdf_url(candidate: Any) -> bool:
1562 text = _clean_text(candidate).lower()
1563 if not (text.startswith("http://") or text.startswith("https://")):
1564 return False
1565 return (
1566 ".pdf" in text
1567 or "/pdf?" in text
1568 or "/pdf/" in text
1569 or "arxiv.org/pdf/" in text
1570 or "openreview.net/pdf" in text
1571 )
1572
1573
1574def _collect_source_page_urls(paper: Dict[str, Any]) -> List[str]:

Callers 5

_get_direct_pdf_urlFunction · 0.85
addFunction · 0.85
_extract_pdf_urlFunction · 0.85

Calls 1

_clean_textFunction · 0.70

Tested by

no test coverage detected