reader-py 0.2.0__tar.gz → 0.3.0__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.
- {reader_py-0.2.0 → reader_py-0.3.0}/PKG-INFO +1 -1
- {reader_py-0.2.0 → reader_py-0.3.0}/pyproject.toml +1 -1
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py/types.py +2 -4
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py.egg-info/PKG-INFO +1 -1
- {reader_py-0.2.0 → reader_py-0.3.0}/tests/test_client.py +2 -3
- {reader_py-0.2.0 → reader_py-0.3.0}/README.md +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/setup.cfg +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py/__init__.py +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py/async_client.py +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py/client.py +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py/errors.py +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py.egg-info/SOURCES.txt +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py.egg-info/dependency_links.txt +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py.egg-info/requires.txt +0 -0
- {reader_py-0.2.0 → reader_py-0.3.0}/src/reader_py.egg-info/top_level.txt +0 -0
|
@@ -7,8 +7,8 @@ from typing import Annotated, Any, Literal, Optional, Union
|
|
|
7
7
|
from pydantic import BaseModel, Field
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
ProxyMode = Literal["standard", "
|
|
11
|
-
ResolvedProxyMode = Literal["standard", "
|
|
10
|
+
ProxyMode = Literal["standard", "premium"]
|
|
11
|
+
ResolvedProxyMode = Literal["standard", "premium"]
|
|
12
12
|
JobStatus = Literal["queued", "processing", "completed", "failed", "cancelled"]
|
|
13
13
|
JobMode = Literal["scrape", "batch", "crawl"]
|
|
14
14
|
|
|
@@ -45,7 +45,6 @@ class ScrapeMetadata(BaseModel):
|
|
|
45
45
|
duration: int
|
|
46
46
|
cached: bool
|
|
47
47
|
proxy_mode: Optional[ResolvedProxyMode] = None
|
|
48
|
-
proxy_escalated: Optional[bool] = None
|
|
49
48
|
scraped_at: str
|
|
50
49
|
|
|
51
50
|
|
|
@@ -68,7 +67,6 @@ class Page(BaseModel):
|
|
|
68
67
|
html: Optional[str] = None
|
|
69
68
|
status_code: Optional[int] = None
|
|
70
69
|
proxy_mode: Optional[ResolvedProxyMode] = None
|
|
71
|
-
proxy_escalated: Optional[bool] = None
|
|
72
70
|
credits: Optional[int] = None
|
|
73
71
|
metadata: Optional[dict[str, Any]] = None
|
|
74
72
|
error: Optional[str] = None
|
|
@@ -89,8 +89,8 @@ class TestReadParams:
|
|
|
89
89
|
params = ReadParams(urls=["https://a.com", "https://b.com"])
|
|
90
90
|
assert len(params.urls) == 2
|
|
91
91
|
|
|
92
|
-
def
|
|
93
|
-
for mode in ("standard", "
|
|
92
|
+
def test_proxy_mode_accepts_both_modes(self):
|
|
93
|
+
for mode in ("standard", "premium"):
|
|
94
94
|
params = ReadParams(url="https://example.com", proxy_mode=mode)
|
|
95
95
|
assert params.proxy_mode == mode
|
|
96
96
|
|
|
@@ -108,7 +108,6 @@ class TestScrapeResult:
|
|
|
108
108
|
cached=False,
|
|
109
109
|
scraped_at="2026-04-04T12:00:00Z",
|
|
110
110
|
proxy_mode="standard",
|
|
111
|
-
proxy_escalated=False,
|
|
112
111
|
)
|
|
113
112
|
result = ScrapeResult(
|
|
114
113
|
url="https://example.com",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|