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

Function extract_doi

skills/journal-fetcher/scripts/fetch_journal.py:1260–1273  ·  view source on GitHub ↗

从 RSS 条目中提取 DOI

(entry)

Source from the content-addressed store, hash-verified

1258 # which dominated a single journal's runtime (Science measured 48s,
1259 # Science Advances 60s for 10 papers). _http_get builds and closes its own
1260 # session per call, so there is no shared state to guard. executor.map
1261 # keeps feed order, and _skip filtering stays positional.
1262 detail_workers = _journal_detail_concurrency(len(candidates))
1263 if len(candidates) > 1 and detail_workers > 1:
1264 def fetch_detail(candidate: Dict[str, Any]) -> Dict[str, Any]:
1265 try:
1266 return _fetch_article_detail(candidate["url"])
1267 except Exception as exc:
1268 print(f" Detail fetch error for {candidate.get('url')}: {exc}")
1269 return {}
1270
1271 with ThreadPoolExecutor(max_workers=detail_workers) as executor:
1272 details = list(executor.map(fetch_detail, candidates))
1273 else:
1274 details = [_fetch_article_detail(candidate["url"]) for candidate in candidates]
1275
1276 for candidate, detail in zip(candidates, details):

Callers 1

fetch_journal_papersFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected