webtools-cli 1.2.2__tar.gz → 1.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.
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/PKG-INFO +2 -2
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/pyproject.toml +2 -2
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/core.py +48 -18
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/PKG-INFO +2 -2
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/requires.txt +1 -1
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/LICENSE +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/README.md +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/setup.cfg +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/__init__.py +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/__main__.py +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/cli.py +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/install.py +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/web/index.html +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/web/script.js +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools/web/style.css +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/SOURCES.txt +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/dependency_links.txt +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/entry_points.txt +0 -0
- {webtools_cli-1.2.2 → webtools_cli-1.2.4}/webtools_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webtools-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
|
|
5
5
|
Author: Abhinav Adarsh
|
|
6
6
|
License-Expression: MIT
|
|
@@ -29,8 +29,8 @@ Requires-Dist: Pillow
|
|
|
29
29
|
Requires-Dist: mtranslate
|
|
30
30
|
Requires-Dist: colorama
|
|
31
31
|
Requires-Dist: playwright
|
|
32
|
-
Requires-Dist: mega.py
|
|
33
32
|
Requires-Dist: pycryptodome
|
|
33
|
+
Requires-Dist: tenacity>=8.2.3
|
|
34
34
|
Requires-Dist: pyreadline3; platform_system == "Windows"
|
|
35
35
|
Provides-Extra: playwright
|
|
36
36
|
Requires-Dist: playwright; extra == "playwright"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "webtools-cli"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
8
8
|
description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -36,8 +36,8 @@ dependencies = [
|
|
|
36
36
|
"mtranslate",
|
|
37
37
|
"colorama",
|
|
38
38
|
"playwright",
|
|
39
|
-
"mega.py",
|
|
40
39
|
"pycryptodome",
|
|
40
|
+
"tenacity>=8.2.3",
|
|
41
41
|
"pyreadline3; platform_system == 'Windows'",
|
|
42
42
|
]
|
|
43
43
|
|
|
@@ -7,29 +7,59 @@ if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
|
7
7
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
|
8
8
|
except Exception: pass
|
|
9
9
|
|
|
10
|
-
# --- AUTO-INSTALLER FOR MISSING DEPENDENCIES ---
|
|
10
|
+
# --- AUTO-INSTALLER FOR MISSING/BROKEN DEPENDENCIES ---
|
|
11
11
|
def ensure_dependencies():
|
|
12
|
-
"""Checks and
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
"""Checks and performs a forced clean install of dependencies at runtime"""
|
|
13
|
+
# Dependencies that must be imported successfully
|
|
14
|
+
# Format: module_name -> (pip_package_name, min_version_prefix, forced_upgrade)
|
|
15
|
+
check_deps = {
|
|
16
|
+
"mega": ("mega.py", None, False),
|
|
17
|
+
"Crypto": ("pycryptodome", None, True), # Always ensure pycryptodome over pycrypto
|
|
18
|
+
"tenacity": ("tenacity>=8.2.3", "8", True)
|
|
16
19
|
}
|
|
17
|
-
missing = []
|
|
18
|
-
for module_name, package_name in dependencies.items():
|
|
19
|
-
try:
|
|
20
|
-
__import__(module_name)
|
|
21
|
-
except ImportError:
|
|
22
|
-
missing.append(package_name)
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
missing_or_broken = []
|
|
22
|
+
|
|
23
|
+
# 1. Clean up "pycrypto" which causes SyntaxError on Python 3
|
|
24
|
+
# If we catch a SyntaxError from 'from mega import Mega', it's almost certainly pycrypto
|
|
25
|
+
try:
|
|
26
|
+
import Crypto.PublicKey.RSA
|
|
27
|
+
except (SyntaxError, AttributeError, ImportError):
|
|
28
|
+
# SyntaxError means it's the old pycrypto. We must kill it.
|
|
29
|
+
missing_or_broken.append("pycryptodome")
|
|
30
|
+
|
|
31
|
+
# 2. Check for missing or outdated modules
|
|
32
|
+
for module_name, (pkg_name, min_v, forced) in check_deps.items():
|
|
27
33
|
try:
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
mod = __import__(module_name)
|
|
35
|
+
if min_v:
|
|
36
|
+
from importlib.metadata import version as get_v
|
|
37
|
+
try:
|
|
38
|
+
if int(get_v(module_name).split('.')[0]) < int(min_v):
|
|
39
|
+
missing_or_broken.append(pkg_name)
|
|
40
|
+
except:
|
|
41
|
+
if forced: missing_or_broken.append(pkg_name)
|
|
42
|
+
except:
|
|
43
|
+
missing_or_broken.append(pkg_name)
|
|
44
|
+
|
|
45
|
+
if missing_or_broken:
|
|
46
|
+
print(f"\n[!] Critical dependency issues detected: {', '.join(missing_or_broken)}")
|
|
47
|
+
print("[*] Running Forced Clean Repair (Python 3.11+ Stability Patch)...")
|
|
48
|
+
try:
|
|
49
|
+
# Step A: Uninstall known troublemakers
|
|
50
|
+
subprocess.call([sys.executable, "-m", "pip", "uninstall", "-y", "pycrypto", "tenacity"],
|
|
51
|
+
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
52
|
+
|
|
53
|
+
# Step B: Install modern core deps
|
|
54
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "pycryptodome", "tenacity>=8.2.3", "requests"])
|
|
55
|
+
|
|
56
|
+
# Step C: Install mega.py WITHOUT dependencies to avoid downgrading tenacity
|
|
57
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "mega.py", "--no-deps"])
|
|
58
|
+
|
|
59
|
+
print("[+] Environment repaired successfully! Please restart the app if it fails next.\n")
|
|
30
60
|
except Exception as e:
|
|
31
|
-
print(f"[-] Auto-
|
|
32
|
-
print("[!] Please run: pip install mega.py
|
|
61
|
+
print(f"[-] Auto-repair failed: {e}")
|
|
62
|
+
print("[!] Please run manually: pip uninstall pycrypto tenacity && pip install pycryptodome tenacity>=8.2.3 mega.py --no-deps")
|
|
33
63
|
|
|
34
64
|
ensure_dependencies()
|
|
35
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webtools-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
|
|
5
5
|
Author: Abhinav Adarsh
|
|
6
6
|
License-Expression: MIT
|
|
@@ -29,8 +29,8 @@ Requires-Dist: Pillow
|
|
|
29
29
|
Requires-Dist: mtranslate
|
|
30
30
|
Requires-Dist: colorama
|
|
31
31
|
Requires-Dist: playwright
|
|
32
|
-
Requires-Dist: mega.py
|
|
33
32
|
Requires-Dist: pycryptodome
|
|
33
|
+
Requires-Dist: tenacity>=8.2.3
|
|
34
34
|
Requires-Dist: pyreadline3; platform_system == "Windows"
|
|
35
35
|
Provides-Extra: playwright
|
|
36
36
|
Requires-Dist: playwright; extra == "playwright"
|
|
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
|