webtools-cli 1.2.3__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.3 → webtools_cli-1.2.4}/PKG-INFO +1 -2
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/pyproject.toml +1 -2
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/core.py +46 -34
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools_cli.egg-info/PKG-INFO +1 -2
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools_cli.egg-info/requires.txt +0 -1
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/LICENSE +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/README.md +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/setup.cfg +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/__init__.py +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/__main__.py +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/cli.py +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/install.py +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/web/index.html +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/web/script.js +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools/web/style.css +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools_cli.egg-info/SOURCES.txt +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools_cli.egg-info/dependency_links.txt +0 -0
- {webtools_cli-1.2.3 → webtools_cli-1.2.4}/webtools_cli.egg-info/entry_points.txt +0 -0
- {webtools_cli-1.2.3 → 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,7 +29,6 @@ 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
|
|
34
33
|
Requires-Dist: tenacity>=8.2.3
|
|
35
34
|
Requires-Dist: pyreadline3; platform_system == "Windows"
|
|
@@ -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,7 +36,6 @@ dependencies = [
|
|
|
36
36
|
"mtranslate",
|
|
37
37
|
"colorama",
|
|
38
38
|
"playwright",
|
|
39
|
-
"mega.py",
|
|
40
39
|
"pycryptodome",
|
|
41
40
|
"tenacity>=8.2.3",
|
|
42
41
|
"pyreadline3; platform_system == 'Windows'",
|
|
@@ -7,47 +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
|
-
|
|
16
|
-
"
|
|
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)
|
|
17
19
|
}
|
|
18
|
-
missing = []
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
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():
|
|
22
33
|
try:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# Special check for tenacity version if it exists
|
|
27
|
-
if module_name == "tenacity":
|
|
28
|
-
from importlib.metadata import version as get_version
|
|
34
|
+
mod = __import__(module_name)
|
|
35
|
+
if min_v:
|
|
36
|
+
from importlib.metadata import version as get_v
|
|
29
37
|
try:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if missing:
|
|
42
|
-
print(f"\n[!] Missing or outdated dependencies detected: {', '.join(missing)}")
|
|
43
|
-
print("[*] Attempting automatic installation/upgrade...")
|
|
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)...")
|
|
44
48
|
try:
|
|
45
|
-
#
|
|
46
|
-
subprocess.
|
|
47
|
-
|
|
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")
|
|
48
60
|
except Exception as e:
|
|
49
|
-
print(f"[-] Auto-
|
|
50
|
-
print(
|
|
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")
|
|
51
63
|
|
|
52
64
|
ensure_dependencies()
|
|
53
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,7 +29,6 @@ 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
|
|
34
33
|
Requires-Dist: tenacity>=8.2.3
|
|
35
34
|
Requires-Dist: pyreadline3; platform_system == "Windows"
|
|
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
|