(candidate: str)
| 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")) |
no test coverage detected