polytool 0.2.3__tar.gz → 0.2.4__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.3 → polytool-0.2.4}/PKG-INFO +1 -1
- {polytool-0.2.3 → polytool-0.2.4}/pyproject.toml +1 -1
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/__init__.py +1 -1
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/dl.py +25 -2
- {polytool-0.2.3 → polytool-0.2.4}/.gitignore +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/LICENSE +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/README.md +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/docs/README.md +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/__main__.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/__init__.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/clip.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/color.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/convert.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/cron.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/data.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/enc.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/file.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/gen.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/img.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/net.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/pdf.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/qr.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/shot.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/text.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/cli/vid.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/__init__.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/browsers.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/config.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/console.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/errors.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/ffmpeg.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/io.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/lazy.py +0 -0
- {polytool-0.2.3 → polytool-0.2.4}/src/polytool/core/progress.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.4
|
|
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.4"
|
|
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"
|
|
@@ -414,13 +414,36 @@ def cmd_info(
|
|
|
414
414
|
f"[dim]Using saved cookies-from-browser: {opts['cookiesfrombrowser'][0]}[/dim]"
|
|
415
415
|
)
|
|
416
416
|
|
|
417
|
+
# process=False skips yt-dlp's format-selection step. We only want metadata,
|
|
418
|
+
# and on some sites (YouTube especially) the default format selector
|
|
419
|
+
# fails with "Requested format is not available" on otherwise-valid videos.
|
|
417
420
|
try:
|
|
418
421
|
with yt_dlp.YoutubeDL(opts) as ydl:
|
|
419
|
-
info = ydl.extract_info(url, download=False)
|
|
422
|
+
info = ydl.extract_info(url, download=False, process=False)
|
|
420
423
|
except Exception as exc:
|
|
421
424
|
raise PolytoolError(f"Could not fetch info: {exc}", hint=_bot_check_hint(str(exc))) from exc
|
|
422
425
|
|
|
423
|
-
|
|
426
|
+
if info is None:
|
|
427
|
+
raise PolytoolError("yt-dlp returned no metadata for this URL.")
|
|
428
|
+
|
|
429
|
+
interesting = (
|
|
430
|
+
"title",
|
|
431
|
+
"uploader",
|
|
432
|
+
"channel",
|
|
433
|
+
"duration",
|
|
434
|
+
"view_count",
|
|
435
|
+
"like_count",
|
|
436
|
+
"upload_date",
|
|
437
|
+
"live_status",
|
|
438
|
+
"webpage_url",
|
|
439
|
+
)
|
|
440
|
+
shown = False
|
|
424
441
|
for key in interesting:
|
|
425
442
|
if key in info and info[key] is not None:
|
|
426
443
|
console.print(f"[cyan]{key}[/cyan]: {info[key]}")
|
|
444
|
+
shown = True
|
|
445
|
+
# Playlists and some sites return only `entries` and a few top-level fields.
|
|
446
|
+
if not shown and info.get("_type") == "playlist":
|
|
447
|
+
console.print(f"[cyan]playlist[/cyan]: {info.get('title') or info.get('id')}")
|
|
448
|
+
entries = info.get("entries") or []
|
|
449
|
+
console.print(f"[cyan]entries[/cyan]: {len(list(entries))}")
|
|
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
|