pyPaperFlow 0.6.2__tar.gz → 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/PKG-INFO +3 -1
  2. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/README.md +2 -0
  3. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/README_zh.md +3 -1
  4. pypaperflow-0.6.3/src/pyPaperFlow/__init__.py +1 -0
  5. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/arxiv_fetcher.py +7 -3
  6. pypaperflow-0.6.2/src/pyPaperFlow/__init__.py +0 -1
  7. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/.github/workflows/docs.yml +0 -0
  8. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/.gitignore +0 -0
  9. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/LICENSE +0 -0
  10. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/mkdoc_site/index.md +0 -0
  11. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/mkdocs.yml +0 -0
  12. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/pyproject.toml +0 -0
  13. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/requirements-docs.txt +0 -0
  14. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/scripts/sync_docs.py +0 -0
  15. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/cli.py +0 -0
  16. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/cloak_fallback.py +0 -0
  17. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/cloak_pdf.py +0 -0
  18. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/github_export.py +0 -0
  19. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/mineru_parser.py +0 -0
  20. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/pdf_fetch.py +0 -0
  21. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/undetected_fallback.py +0 -0
  22. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/integrations/undetected_pdf.py +0 -0
  23. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/biorxiv_fetcher.py +0 -0
  24. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/chemrxiv_fetcher.py +0 -0
  25. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/europepmc_fetcher.py +0 -0
  26. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/source_merge.py +0 -0
  27. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/source_models.py +0 -0
  28. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/preprint/source_utils.py +0 -0
  29. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/pubmed/__init__.py +0 -0
  30. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/pubmed/pubmed_fetcher.py +0 -0
  31. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/pubmed/pubmed_merger.py +0 -0
  32. {pypaperflow-0.6.2 → pypaperflow-0.6.3}/src/pyPaperFlow/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pyPaperFlow
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Summary: Automated paper fetching and analysis platform.
5
5
  Project-URL: Homepage, https://github.com/MaybeBio/pyPaperFlow
6
6
  Project-URL: Issues, https://github.com/MaybeBio/pyPaperFlow/issues
@@ -1453,6 +1453,8 @@ In theory, all DOI‑driven literature workflows can be standardised following t
1453
1453
 
1454
1454
  > Modules dedicated to the aforementioned preprint platforms are still under development and refinement. Preprint‑related subcommands are provided for testing purposes only. For detailed test cases, refer to [Cases](./docs/Cases.md)
1455
1455
 
1456
+ > **arXiv search backend note.** The `arxiv-search` / `arxiv-fetch` `native` backend talks to `export.arxiv.org` over `requests` (urllib3), not `httpx`: arXiv's Fastly CDN rejects `httpx`'s TLS fingerprint with HTTP 406 on boolean queries (fielded `OR` / quoted phrases), while `requests` and `curl` route through Google's edge and return 200. See [Cases](./docs/Cases.md) for details.
1457
+
1456
1458
  #### Preprint full-text fetch (Python API)
1457
1459
 
1458
1460
  For preprints without an open-access PDF, each fetcher exposes a `fetch_full_text()` method that returns clean section-headed text without any PDF parsing:
@@ -1424,6 +1424,8 @@ In theory, all DOI‑driven literature workflows can be standardised following t
1424
1424
 
1425
1425
  > Modules dedicated to the aforementioned preprint platforms are still under development and refinement. Preprint‑related subcommands are provided for testing purposes only. For detailed test cases, refer to [Cases](./docs/Cases.md)
1426
1426
 
1427
+ > **arXiv search backend note.** The `arxiv-search` / `arxiv-fetch` `native` backend talks to `export.arxiv.org` over `requests` (urllib3), not `httpx`: arXiv's Fastly CDN rejects `httpx`'s TLS fingerprint with HTTP 406 on boolean queries (fielded `OR` / quoted phrases), while `requests` and `curl` route through Google's edge and return 200. See [Cases](./docs/Cases.md) for details.
1428
+
1427
1429
  #### Preprint full-text fetch (Python API)
1428
1430
 
1429
1431
  For preprints without an open-access PDF, each fetcher exposes a `fetch_full_text()` method that returns clean section-headed text without any PDF parsing:
@@ -1606,10 +1606,12 @@ paperflow arxiv-fetch "deep learning for biology" --max-results 10 --download-pd
1606
1606
  常用参数:
1607
1607
 
1608
1608
  - `--start-date` / `--end-date`:按 `YYYY-MM-DD` 格式限制日期范围。
1609
- - `--backend`:可选 `native`(内置的 httpx 方案)或 `paperscraper`(安装了第三方包时可用, ⚠️ 暂时未测试paperscraper)。
1609
+ - `--backend`:可选 `native`(内置的 requests 方案)或 `paperscraper`(安装了第三方包时可用, ⚠️ 暂时未测试paperscraper)。
1610
1610
  - `--output-dir`:把 ID 列表或抓取结果保存到其他目录。
1611
1611
  - `--no-download-pdf`:只保存元数据,不下载 PDF。
1612
1612
 
1613
+ > ⚠️ **为什么 `native` 用 `requests` 而非 `httpx`**:arXiv 的 `export.arxiv.org` API 在 Fastly CDN 后面,会对 `httpx` 的 TLS 指纹在**布尔查询**(任何带字段的 `OR` 或引号短语——也就是多词检索时 query builder 生成的形式)上返回 **HTTP 406**。`requests`(urllib3)和 `curl` 会经 Google 边缘节点返回 200。单个裸词恰好 `httpx` 也能通过,但真实布尔查询需要非 `httpx` 客户端。
1614
+
1613
1615
  日期过滤示例:
1614
1616
 
1615
1617
  ```bash
@@ -0,0 +1 @@
1
+ __version__ = "0.6.3"
@@ -9,6 +9,7 @@ from pathlib import Path
9
9
  from typing import Any, Dict, Iterable, List, Optional
10
10
 
11
11
  import httpx
12
+ import requests
12
13
  from bs4 import BeautifulSoup
13
14
 
14
15
  from .source_models import SourcePaper
@@ -372,9 +373,12 @@ class ArxivFetcher:
372
373
  last_error: Optional[Exception] = None
373
374
 
374
375
  for attempt in range(self.max_retries):
375
- response: Optional[httpx.Response] = None
376
+ response = None
376
377
  try:
377
- response = self._get_http_client().get(
378
+ # arXiv's Fastly CDN returns 406 for httpx's TLS fingerprint on
379
+ # boolean queries (OR / quoted phrases). requests (urllib3) and
380
+ # curl pass through to Google's edge, so use requests here.
381
+ response = requests.get(
378
382
  ARXIV_API_URL,
379
383
  params=params,
380
384
  headers=self.headers,
@@ -395,7 +399,7 @@ class ArxivFetcher:
395
399
  sleep_before_retry(response, attempt)
396
400
  continue
397
401
  break
398
- except (httpx.HTTPStatusError, httpx.TimeoutException, httpx.TransportError) as exc:
402
+ except requests.exceptions.RequestException as exc:
399
403
  last_error = exc
400
404
  if attempt + 1 < self.max_retries:
401
405
  sleep_before_retry(response, attempt)
@@ -1 +0,0 @@
1
- __version__ = "0.6.2"
File without changes
File without changes
File without changes
File without changes