MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / http_get_bytes

Function http_get_bytes

scripts/common.py:406–409  ·  view source on GitHub ↗
(url: str, *, timeout: int = 60, headers: dict[str, str] | None = None)

Source from the content-addressed store, hash-verified

404
405
406def http_get_bytes(url: str, *, timeout: int = 60, headers: dict[str, str] | None = None) -> bytes:
407 request = urllib.request.Request(url, headers=headers or {"User-Agent": DEFAULT_USER_AGENT})
408 with urllib.request.urlopen(request, timeout=timeout) as response:
409 return response.read()
410
411
412def semantic_scholar_headers() -> dict[str, str]:

Callers 1

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected