polytool 0.2.7__tar.gz → 0.2.8__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.
- {polytool-0.2.7 → polytool-0.2.8}/PKG-INFO +1 -1
- {polytool-0.2.7 → polytool-0.2.8}/pyproject.toml +1 -1
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/__init__.py +1 -1
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/dl.py +27 -5
- {polytool-0.2.7 → polytool-0.2.8}/.gitignore +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/LICENSE +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/README.md +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/docs/README.md +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/__main__.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/__init__.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/clip.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/color.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/convert.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/cron.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/data.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/enc.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/file.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/gen.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/img.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/net.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/pdf.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/qr.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/shot.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/text.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/cli/vid.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/__init__.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/browsers.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/config.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/console.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/errors.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/ffmpeg.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/io.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/lazy.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/progress.py +0 -0
- {polytool-0.2.7 → polytool-0.2.8}/src/polytool/core/runtime.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polytool
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: One-binary CLI bundling 26 everyday utilities — image/video/PDF conversion, background removal, OCR, QR codes, hashing, downloads, and more
|
|
5
5
|
Project-URL: Homepage, https://github.com/k6w/polytool
|
|
6
6
|
Project-URL: Repository, https://github.com/k6w/polytool
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "polytool"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.8"
|
|
8
8
|
description = "One-binary CLI bundling 26 everyday utilities — image/video/PDF conversion, background removal, OCR, QR codes, hashing, downloads, and more"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.13"
|
|
@@ -149,14 +149,36 @@ def _n_challenge_hint(messages: list[str]) -> str | None:
|
|
|
149
149
|
text = " ".join(messages).lower()
|
|
150
150
|
if not any(p in text for p in N_CHALLENGE_PATTERNS):
|
|
151
151
|
return None
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
|
|
153
|
+
# When cookies are configured we know we're in a logged-in session — that's
|
|
154
|
+
# by far the most common cause of these errors (YouTube tightens access for
|
|
155
|
+
# accounts in their DRM A/B bucket). Try anonymous access first.
|
|
156
|
+
using_cookies = bool(
|
|
157
|
+
config.get("dl", "cookies_from_browser") or config.get("dl", "cookies_file")
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
fixes: list[str] = []
|
|
161
|
+
if using_cookies:
|
|
162
|
+
fixes.append(
|
|
163
|
+
"[bold]Most likely fix:[/bold] try without cookies. YouTube often gates "
|
|
164
|
+
"logged-in sessions into a DRM-only bucket.\n"
|
|
165
|
+
" [cyan]pt dl setup --clear[/cyan] [dim]# forget saved cookies (just for testing)[/dim]\n"
|
|
166
|
+
" [cyan]pt dl get URL[/cyan]\n"
|
|
167
|
+
"If that works, re-save cookies for sites that need them: "
|
|
168
|
+
"[cyan]pt dl setup --browser firefox[/cyan]"
|
|
169
|
+
)
|
|
170
|
+
fixes.append(
|
|
171
|
+
"If it still fails, make sure a JS runtime is on PATH. Polytool can manage one:\n"
|
|
155
172
|
" [cyan]pt dl runtime install[/cyan] "
|
|
156
|
-
"[dim]# downloads Deno (~50 MB) into ~/.polytool/runtime/[/dim]
|
|
157
|
-
|
|
173
|
+
"[dim]# downloads Deno (~50 MB) into ~/.polytool/runtime/[/dim]"
|
|
174
|
+
)
|
|
175
|
+
fixes.append(
|
|
176
|
+
"Some videos are flagged DRM in your specific YouTube session — those can't "
|
|
177
|
+
"be downloaded by any tool. Try a different video or account."
|
|
158
178
|
)
|
|
159
179
|
|
|
180
|
+
return "\n\n".join(fixes)
|
|
181
|
+
|
|
160
182
|
|
|
161
183
|
def _drm_hint(messages: list[str]) -> str | None:
|
|
162
184
|
text = " ".join(messages).lower()
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|