webtools-cli 1.0.0__tar.gz → 1.1.2__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.0.0/webtools_cli.egg-info → webtools_cli-1.1.2}/PKG-INFO +5 -6
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/README.md +2 -2
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/pyproject.toml +3 -4
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/core.py +28 -21
- {webtools_cli-1.0.0 → webtools_cli-1.1.2/webtools_cli.egg-info}/PKG-INFO +5 -6
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/LICENSE +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/setup.cfg +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/__init__.py +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/__main__.py +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/cli.py +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/web/Web_Tools.png +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/web/index.html +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/web/script.js +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools/web/style.css +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools_cli.egg-info/SOURCES.txt +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools_cli.egg-info/dependency_links.txt +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools_cli.egg-info/entry_points.txt +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools_cli.egg-info/requires.txt +0 -0
- {webtools_cli-1.0.0 → webtools_cli-1.1.2}/webtools_cli.egg-info/top_level.txt +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webtools-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
|
|
5
5
|
Author: Abhinav Adarsh
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/abhinavgautam08/webtools
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/abhinavgautam08/webtools-cli
|
|
8
8
|
Keywords: web-scraping,osint,seo,intelligence,cli
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
12
|
Classifier: Programming Language :: Python :: 3
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -35,7 +34,7 @@ Requires-Dist: playwright; extra == "playwright"
|
|
|
35
34
|
Dynamic: license-file
|
|
36
35
|
|
|
37
36
|
<p align="center">
|
|
38
|
-
<img src="Web_Tools.png" alt="WebTools CLI" width="180">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/abhinavgautam08/webtools-cli/main/Web_Tools.png" alt="WebTools CLI" width="180">
|
|
39
38
|
</p>
|
|
40
39
|
|
|
41
40
|
<h1 align="center">WebTools CLI</h1>
|
|
@@ -48,7 +47,7 @@ Dynamic: license-file
|
|
|
48
47
|
<p align="center">
|
|
49
48
|
<img src="https://img.shields.io/badge/python-3.9+-blue?logo=python&logoColor=white" alt="Python">
|
|
50
49
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
51
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
50
|
+
<img src="https://img.shields.io/badge/version-1.1.1-cyan" alt="Version">
|
|
52
51
|
</p>
|
|
53
52
|
|
|
54
53
|
---
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="Web_Tools.png" alt="WebTools CLI" width="180">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/abhinavgautam08/webtools-cli/main/Web_Tools.png" alt="WebTools CLI" width="180">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">WebTools CLI</h1>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<img src="https://img.shields.io/badge/python-3.9+-blue?logo=python&logoColor=white" alt="Python">
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
15
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
15
|
+
<img src="https://img.shields.io/badge/version-1.1.1-cyan" alt="Version">
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
18
|
---
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "webtools-cli"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.1.2"
|
|
8
8
|
description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license =
|
|
10
|
+
license = "MIT"
|
|
11
11
|
requires-python = ">=3.9"
|
|
12
12
|
authors = [
|
|
13
13
|
{name = "Abhinav Adarsh"},
|
|
@@ -17,7 +17,6 @@ classifiers = [
|
|
|
17
17
|
"Development Status :: 4 - Beta",
|
|
18
18
|
"Environment :: Console",
|
|
19
19
|
"Intended Audience :: Developers",
|
|
20
|
-
"License :: OSI Approved :: MIT License",
|
|
21
20
|
"Programming Language :: Python :: 3",
|
|
22
21
|
"Programming Language :: Python :: 3.9",
|
|
23
22
|
"Programming Language :: Python :: 3.10",
|
|
@@ -46,7 +45,7 @@ playwright = ["playwright"]
|
|
|
46
45
|
webtools = "webtools.cli:main"
|
|
47
46
|
|
|
48
47
|
[project.urls]
|
|
49
|
-
Homepage = "https://github.com/abhinavgautam08/webtools"
|
|
48
|
+
Homepage = "https://github.com/abhinavgautam08/webtools-cli"
|
|
50
49
|
|
|
51
50
|
[tool.setuptools.packages.find]
|
|
52
51
|
include = ["webtools*"]
|
|
@@ -4,7 +4,8 @@ sys.dont_write_bytecode = True
|
|
|
4
4
|
# --- PACKAGE PATHS ---
|
|
5
5
|
PACKAGE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
6
6
|
DATA_DIR = os.path.join(os.path.expanduser('~'), '.webtools')
|
|
7
|
-
os.
|
|
7
|
+
SCRAPED_DIR = os.path.join(DATA_DIR, 'scraped')
|
|
8
|
+
os.makedirs(SCRAPED_DIR, exist_ok=True)
|
|
8
9
|
try:
|
|
9
10
|
from colorama import init, Fore, Style
|
|
10
11
|
init(autoreset=True)
|
|
@@ -97,9 +98,8 @@ log.setLevel(logging.ERROR)
|
|
|
97
98
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
98
99
|
|
|
99
100
|
# Directories setup kar rahe hain
|
|
100
|
-
os.makedirs('
|
|
101
|
-
os.makedirs('
|
|
102
|
-
os.makedirs('webfiles/scraped/videos', exist_ok=True)
|
|
101
|
+
os.makedirs(os.path.join(SCRAPED_DIR, 'images'), exist_ok=True)
|
|
102
|
+
os.makedirs(os.path.join(SCRAPED_DIR, 'videos'), exist_ok=True)
|
|
103
103
|
|
|
104
104
|
# --- PERFORMANCE AUDITOR ---
|
|
105
105
|
class PerformanceTracker:
|
|
@@ -385,7 +385,7 @@ def serve_favicon():
|
|
|
385
385
|
|
|
386
386
|
@app.route('/download/<path:filename>')
|
|
387
387
|
def serve_scraped_file(filename):
|
|
388
|
-
return send_from_directory(
|
|
388
|
+
return send_from_directory(SCRAPED_DIR, filename)
|
|
389
389
|
|
|
390
390
|
def scrape_with_playwright(url, proxy=None):
|
|
391
391
|
if not PLAYWRIGHT_AVAILABLE:
|
|
@@ -990,7 +990,7 @@ def execute_scrape_logic(url, fetch_images=False, fetch_videos=False, crawl_dept
|
|
|
990
990
|
else:
|
|
991
991
|
filename = f"{base}_{uuid.uuid4().hex[:8]}{ext}"
|
|
992
992
|
|
|
993
|
-
filepath =
|
|
993
|
+
filepath = os.path.join(SCRAPED_DIR, 'videos', filename)
|
|
994
994
|
|
|
995
995
|
# Pehle TURBO FETCH try karo
|
|
996
996
|
if not download_file_turbo(v_url, filepath):
|
|
@@ -1161,7 +1161,7 @@ def execute_scrape_logic(url, fetch_images=False, fetch_videos=False, crawl_dept
|
|
|
1161
1161
|
|
|
1162
1162
|
filename = f"{uuid.uuid4().hex[:8]}_{filename}"
|
|
1163
1163
|
|
|
1164
|
-
filepath =
|
|
1164
|
+
filepath = os.path.join(SCRAPED_DIR, 'images', filename)
|
|
1165
1165
|
with open(filepath, 'wb') as f:
|
|
1166
1166
|
f.write(content)
|
|
1167
1167
|
return (img_src, f'images/{filename}', f'/download/images/{filename}', image_hash, filepath)
|
|
@@ -1767,12 +1767,12 @@ def api_save():
|
|
|
1767
1767
|
@app.route('/api/download-zip')
|
|
1768
1768
|
def download_zip():
|
|
1769
1769
|
try:
|
|
1770
|
-
zip_path = '
|
|
1770
|
+
zip_path = os.path.join(DATA_DIR, 'scraped_files.zip')
|
|
1771
1771
|
with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
|
1772
|
-
for root, dirs, files in os.walk(
|
|
1772
|
+
for root, dirs, files in os.walk(SCRAPED_DIR):
|
|
1773
1773
|
for file in files:
|
|
1774
1774
|
file_path = os.path.join(root, file)
|
|
1775
|
-
arcname = os.path.relpath(file_path,
|
|
1775
|
+
arcname = os.path.relpath(file_path, SCRAPED_DIR)
|
|
1776
1776
|
zipf.write(file_path, arcname)
|
|
1777
1777
|
|
|
1778
1778
|
return send_file(zip_path, as_attachment=True, download_name='scraped_files.zip')
|
|
@@ -1781,12 +1781,10 @@ def download_zip():
|
|
|
1781
1781
|
|
|
1782
1782
|
def clear_scraped_data():
|
|
1783
1783
|
try:
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
os.makedirs('
|
|
1788
|
-
os.makedirs('webfiles/scraped/images', exist_ok=True)
|
|
1789
|
-
os.makedirs('webfiles/scraped/videos', exist_ok=True)
|
|
1784
|
+
if os.path.exists(SCRAPED_DIR):
|
|
1785
|
+
shutil.rmtree(SCRAPED_DIR)
|
|
1786
|
+
os.makedirs(os.path.join(SCRAPED_DIR, 'images'), exist_ok=True)
|
|
1787
|
+
os.makedirs(os.path.join(SCRAPED_DIR, 'videos'), exist_ok=True)
|
|
1790
1788
|
return True
|
|
1791
1789
|
except Exception as e:
|
|
1792
1790
|
print(f"Cleanup Error: {e}")
|
|
@@ -2156,11 +2154,20 @@ def start_cloudflare_tunnel(port):
|
|
|
2156
2154
|
# OS ke hisaab se executable choose karo
|
|
2157
2155
|
cf_executable = os.path.join(DATA_DIR, 'cloudflared.exe') if os.name == 'nt' else os.path.join(DATA_DIR, 'cloudflared')
|
|
2158
2156
|
|
|
2159
|
-
# Agar missing ho
|
|
2160
|
-
if not os.path.exists(cf_executable)
|
|
2161
|
-
print("Downloading cloudflared...")
|
|
2162
|
-
|
|
2163
|
-
|
|
2157
|
+
# Agar missing ho toh download karo
|
|
2158
|
+
if not os.path.exists(cf_executable):
|
|
2159
|
+
print(f"Downloading cloudflared for {os.name}...")
|
|
2160
|
+
if os.name == 'nt':
|
|
2161
|
+
# Windows binary download URL
|
|
2162
|
+
win_url = "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe"
|
|
2163
|
+
resp = requests.get(win_url, stream=True)
|
|
2164
|
+
with open(cf_executable, 'wb') as f:
|
|
2165
|
+
for chunk in resp.iter_content(chunk_size=8192):
|
|
2166
|
+
f.write(chunk)
|
|
2167
|
+
else:
|
|
2168
|
+
# Linux binary download URL
|
|
2169
|
+
subprocess.run(['wget', '-q', '-O', cf_executable, 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64'])
|
|
2170
|
+
subprocess.run(['chmod', '+x', cf_executable])
|
|
2164
2171
|
|
|
2165
2172
|
process = subprocess.Popen(
|
|
2166
2173
|
[cf_executable, 'tunnel', '--protocol', 'http2', '--url', f'http://127.0.0.1:{port}'],
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webtools-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
|
|
5
5
|
Author: Abhinav Adarsh
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/abhinavgautam08/webtools
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/abhinavgautam08/webtools-cli
|
|
8
8
|
Keywords: web-scraping,osint,seo,intelligence,cli
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
13
12
|
Classifier: Programming Language :: Python :: 3
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -35,7 +34,7 @@ Requires-Dist: playwright; extra == "playwright"
|
|
|
35
34
|
Dynamic: license-file
|
|
36
35
|
|
|
37
36
|
<p align="center">
|
|
38
|
-
<img src="Web_Tools.png" alt="WebTools CLI" width="180">
|
|
37
|
+
<img src="https://raw.githubusercontent.com/abhinavgautam08/webtools-cli/main/Web_Tools.png" alt="WebTools CLI" width="180">
|
|
39
38
|
</p>
|
|
40
39
|
|
|
41
40
|
<h1 align="center">WebTools CLI</h1>
|
|
@@ -48,7 +47,7 @@ Dynamic: license-file
|
|
|
48
47
|
<p align="center">
|
|
49
48
|
<img src="https://img.shields.io/badge/python-3.9+-blue?logo=python&logoColor=white" alt="Python">
|
|
50
49
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="License">
|
|
51
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
50
|
+
<img src="https://img.shields.io/badge/version-1.1.1-cyan" alt="Version">
|
|
52
51
|
</p>
|
|
53
52
|
|
|
54
53
|
---
|
|
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
|