← Về thư mục
- network_allowed · function · L52-L53 — def network_allowed() -> bool
- NetworkDisabled · class · L56-L57 — class NetworkDisabled(RuntimeError)
- SSRFBlocked · class · L60-L61 — class SSRFBlocked(RuntimeError)
- _require_network · function · L64-L69 — def _require_network() -> None
- _fake_ip_host_allowed · function · L72-L101 — def _fake_ip_host_allowed(host: str) -> bool
- _host_is_private · function · L104-L134 — def _host_is_private(host: str) -> bool
- guard_url · function · L137-L146 — def guard_url(url: str) -> None
- _guard_url · function · L149-L163 — def _guard_url(url: str) -> None
- ResponseTooLarge · class · L175-L176 — class ResponseTooLarge(RuntimeError)
- _read_capped · function · L179-L197 — def _read_capped(reader: Any, limit: int) -> bytes
- _copy_capped · function · L200-L215 — def _copy_capped(reader: Any, writer: BinaryIO, limit: int) -> tuple[int, str]
- _hash_capped · function · L218-L232 — def _hash_capped(reader: Any, limit: int) -> tuple[int, str]
- _path_matches_regular_inode · function · L235-L240 — def _path_matches_regular_inode(path: pathlib.Path, expected: os.stat_result) -> bool
- _NoRedirect · class · L243-L253 — class _NoRedirect(urllib.request.HTTPRedirectHandler)
- redirect_request · method · L252-L253 — def redirect_request(self, _args, *_kwargs): # noqa: ANN002, ANN003
- _no_redirect_opener · function · L256-L265 — def _no_redirect_opener() -> urllib.request.OpenerDirector
- _open_http_response · function · L274-L350 — def _open_http_response( url: str, *, timeout: float = 30.0, headers: dict | None = None, method: str = "GET", _max_redirects: int = 5, ) -> Iterator[tuple[Any, str, str]]
- _http_get · function · L353-L383 — def _http_get( url: str, *, timeout: float = 30.0, headers: dict | None = None, method: str = "GET", max_bytes: int | None = None, _max_redirects: int = 5, ) -> tuple[bytes, str, str]
- _html_to_markdown · function · L389-L485 — def _html_to_markdown(html_text: str) -> str
- _walk · function · L436-L475 — def _walk(node) -> None
- _strip_tags · function · L488-L494 — def _strip_tags(html_text: str) -> str
- web_fetch · function · L497-L564 — def web_fetch( url: str, fmt: str = "markdown", timeout: float = 30.0, max_chars: int = 20000, *, method: str = "GET", user_agent: str | None = None, ) -> dict
- web_probe · function · L567-L627 — def web_probe( url: str, *, timeout: float = 15.0, user_agent: str | None = None, ) -> dict
- web_download · function · L630-L725 — def web_download( url: str, destination: "os.PathLike[str] | str", *, timeout: float = 60.0, max_bytes: int = 64 * 1024 * 1024, user_agent: str | None = None, ) -> dict
- _tavily_key · function · L746-L750 — def _tavily_key() -> str
- _tavily_search · function · L753-L795 — def _tavily_search(query: str, num_results: int, timeout: float) -> list[dict]
- web_search · function · L798-L860 — def web_search(query: str, num_results: int = 8, timeout: float = 20.0) -> dict
- _time_left · function · L864-L865 — def _time_left(deadline: float) -> float
- _req_timeout · function · L868-L871 — def _req_timeout(deadline: float) -> float
- _identifier_route · function · L875-L893 — def _identifier_route(query: str, deadline: float) -> tuple[str, list[dict]] | None
- _crossref_lookup · function · L896-L926 — def _crossref_lookup(doi: str, timeout: float) -> list[dict]
- _arxiv_lookup · function · L929-L960 — def _arxiv_lookup(arxiv_id: str, timeout: float) -> list[dict]
- _tag · function · L940-L944 — def _tag(name: str, e: str = e) -> str
- _engine_sweep · function · L964-L987 — def _engine_sweep( query: str, num_results: int, deadline: float ) -> tuple[list[dict], str | None]
- _simplify_query · function · L990-L996 — def _simplify_query(query: str) -> str
- _norm_url · function · L999-L1019 — def _norm_url(url: str) -> str
- _dedupe · function · L1022-L1034 — def _dedupe(results: list[dict]) -> list[dict]
- _ddg_unwrap · function · L1037-L1049 — def _ddg_unwrap(href: str) -> str: # DuckDuckGo wraps hits as /l/?uddg=
- _bing_unwrap · function · L1052-L1064 — def _bing_unwrap(href: str) -> str: # Bing sometimes wraps organic hits as /ck/a?...&u=a1
- _ddg_html · function · L1067-L1101 — def _ddg_html(query: str, num_results: int, timeout: float) -> list[dict]
- _bing_html · function · L1104-L1154 — def _bing_html(query: str, num_results: int, timeout: float) -> list[dict]
- _ddg_lite · function · L1157-L1192 — def _ddg_lite(query: str, num_results: int, timeout: float) -> list[dict]
- _mojeek_html · function · L1195-L1237 — def _mojeek_html(query: str, num_results: int, timeout: float) -> list[dict]