rolling-reader 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.
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/PKG-INFO +1 -1
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/pyproject.toml +27 -27
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/cli.py +10 -8
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/.gitignore +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/README.md +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/__init__.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/cache/__init__.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/cache/profile.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/dispatcher.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/extractor/__init__.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/extractor/cdp.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/extractor/clean.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/extractor/http.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/extractor/state.py +0 -0
- {rolling_reader-0.6.2 → rolling_reader-0.6.3}/src/rolling_reader/models.py +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "rolling-reader"
|
|
7
|
-
version = "0.6.
|
|
8
|
-
description = "Local-first web scraper that automatically rolls through HTTP → browser → JS state extraction"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
license = { text = "MIT" }
|
|
11
|
-
requires-python = ">=3.11"
|
|
12
|
-
dependencies = [
|
|
13
|
-
"httpx>=0.28",
|
|
14
|
-
"beautifulsoup4>=4.14",
|
|
15
|
-
"typer>=0.12",
|
|
16
|
-
"playwright>=1.44",
|
|
17
|
-
"trafilatura>=1.12",
|
|
18
|
-
]
|
|
19
|
-
|
|
20
|
-
[project.scripts]
|
|
21
|
-
rr = "rolling_reader.cli:main"
|
|
22
|
-
|
|
23
|
-
[tool.hatch.build.targets.wheel]
|
|
24
|
-
packages = ["src/rolling_reader"]
|
|
25
|
-
|
|
26
|
-
[tool.hatch.build.targets.sdist]
|
|
27
|
-
include = ["src/"]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rolling-reader"
|
|
7
|
+
version = "0.6.3"
|
|
8
|
+
description = "Local-first web scraper that automatically rolls through HTTP → browser → JS state extraction"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"httpx>=0.28",
|
|
14
|
+
"beautifulsoup4>=4.14",
|
|
15
|
+
"typer>=0.12",
|
|
16
|
+
"playwright>=1.44",
|
|
17
|
+
"trafilatura>=1.12",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
rr = "rolling_reader.cli:main"
|
|
22
|
+
|
|
23
|
+
[tool.hatch.build.targets.wheel]
|
|
24
|
+
packages = ["src/rolling_reader"]
|
|
25
|
+
|
|
26
|
+
[tool.hatch.build.targets.sdist]
|
|
27
|
+
include = ["src/"]
|
|
@@ -324,20 +324,22 @@ def launch_chrome(
|
|
|
324
324
|
os.makedirs(profile_dir, exist_ok=True)
|
|
325
325
|
typer.echo("Starting with a fresh profile (login state cleared).", err=True)
|
|
326
326
|
else:
|
|
327
|
-
#
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
# rolling-reader 已有自己的 cookies → 直接用,不覆盖
|
|
328
|
+
rr_cookies = os.path.join(profile_dir, "Default", "Network", "Cookies")
|
|
329
|
+
has_own_cookies = os.path.exists(rr_cookies) and os.path.getsize(rr_cookies) > 0
|
|
330
|
+
if has_own_cookies:
|
|
331
|
+
typer.echo("Using your saved login state.", err=True)
|
|
331
332
|
else:
|
|
332
|
-
|
|
333
|
-
|
|
333
|
+
# 首次运行:从真实 Chrome profile 同步 cookies 作为起点
|
|
334
|
+
synced = _sync_cookies_from_real_profile(str(profile_dir))
|
|
335
|
+
if synced:
|
|
336
|
+
typer.echo("Synced cookies from your Chrome profile.", err=True)
|
|
337
|
+
else:
|
|
334
338
|
typer.echo(
|
|
335
339
|
"First run: a new browser profile will open.\n"
|
|
336
340
|
"Log in to any sites you need — your login state will be saved for next time.",
|
|
337
341
|
err=True,
|
|
338
342
|
)
|
|
339
|
-
else:
|
|
340
|
-
typer.echo("Using saved profile (your logins are preserved).", err=True)
|
|
341
343
|
|
|
342
344
|
args = [
|
|
343
345
|
exe,
|
|
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
|
|
File without changes
|
|
File without changes
|