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

Function fetch_arxiv_entries

scripts/common.py:474–492  ·  view source on GitHub ↗
(*, search_query: str = "", id_list: str = "", max_results: int = 10)

Source from the content-addressed store, hash-verified

472
473
474def fetch_arxiv_entries(*, search_query: str = "", id_list: str = "", max_results: int = 10) -> list[dict[str, Any]]:
475 params = urllib.parse.urlencode(
476 {
477 "search_query": search_query,
478 "id_list": id_list,
479 "start": 0,
480 "max_results": max_results,
481 }
482 )
483 try:
484 xml_content = http_get_text(f"https://export.arxiv.org/api/query?{params}")
485 except Exception:
486 return []
487 if not normalize_whitespace(xml_content):
488 return []
489 try:
490 return parse_arxiv_xml(xml_content)
491 except Exception:
492 return []
493
494
495def safe_fetch_arxiv_entries(*, search_query: str = "", id_list: str = "", max_results: int = 10) -> list[dict[str, Any]]:

Calls 3

http_get_textFunction · 0.85
normalize_whitespaceFunction · 0.85
parse_arxiv_xmlFunction · 0.85