MultiDown 0.3.1__tar.gz → 0.5.0__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.
- multidown-0.5.0/MANIFEST.in +3 -0
- multidown-0.5.0/MultiDown/__init__.py +4 -0
- multidown-0.5.0/MultiDown/__main__.py +41 -0
- multidown-0.5.0/MultiDown/downloader.py +97 -0
- multidown-0.5.0/MultiDown/webapp.py +58 -0
- multidown-0.5.0/MultiDown.egg-info/PKG-INFO +59 -0
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown.egg-info/SOURCES.txt +5 -2
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown.egg-info/entry_points.txt +1 -0
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown.egg-info/requires.txt +1 -1
- multidown-0.5.0/PKG-INFO +59 -0
- multidown-0.5.0/README.md +24 -0
- multidown-0.5.0/pyproject.toml +42 -0
- {multidown-0.3.1 → multidown-0.5.0}/setup.cfg +4 -4
- multidown-0.3.1/MultiDown/__init__.py +0 -0
- multidown-0.3.1/MultiDown/__main__.py +0 -24
- multidown-0.3.1/MultiDown/downloader.py +0 -44
- multidown-0.3.1/MultiDown/webapp.py +0 -45
- multidown-0.3.1/MultiDown.egg-info/PKG-INFO +0 -15
- multidown-0.3.1/PKG-INFO +0 -15
- multidown-0.3.1/setup.py +0 -40
- {multidown-0.3.1 → multidown-0.5.0}/LICENSE +0 -0
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown/static/index.html +0 -0
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown.egg-info/dependency_links.txt +0 -0
- {multidown-0.3.1 → multidown-0.5.0}/MultiDown.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from rich import print as rprint
|
|
4
|
+
|
|
5
|
+
from .webapp import start_server
|
|
6
|
+
from . import __version__
|
|
7
|
+
|
|
8
|
+
banner = """[bold cyan]
|
|
9
|
+
██████╗ ██╗ ██╗███╗ ██╗██╗ ██████╗ ██████╗
|
|
10
|
+
██╔══██╗██║ ██║████╗ ██║██║ ██╔══██╗██╔══██╗
|
|
11
|
+
██████╔╝██║ █╗ ██║██╔██╗ ██║██║ ██║ ██║██████╔╝
|
|
12
|
+
██╔═══╝ ██║███╗██║██║╚██╗██║██║ ██║ ██║██╔═══╝
|
|
13
|
+
██║ ╚███╔███╔╝██║ ╚████║███████╗██████╔╝██║
|
|
14
|
+
╚═╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝╚═════╝ ╚═╝
|
|
15
|
+
[/bold cyan]"""
|
|
16
|
+
|
|
17
|
+
author = """[bold cyan]AUTHOR: BISMOY GHOSH
|
|
18
|
+
Thanks for using MultiDown v{version}[/bold cyan]"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def main():
|
|
22
|
+
parser = argparse.ArgumentParser(prog="MultiDown", description="MultiDown video downloader")
|
|
23
|
+
parser.add_argument("--host", default="127.0.0.1", help="host to bind (default 127.0.0.1)")
|
|
24
|
+
parser.add_argument("--port", type=int, default=8000, help="port (default 8000)")
|
|
25
|
+
parser.add_argument("--no-browser", action="store_true", help="do not open the browser automatically")
|
|
26
|
+
parser.add_argument("--version", action="version", version=f"MultiDown {__version__}")
|
|
27
|
+
args = parser.parse_args()
|
|
28
|
+
|
|
29
|
+
rprint(banner)
|
|
30
|
+
rprint(author.format(version=__version__))
|
|
31
|
+
rprint("[bold green]Launching local web UI...[/bold green]")
|
|
32
|
+
try:
|
|
33
|
+
start_server(args.host, args.port, not args.no_browser)
|
|
34
|
+
except OSError as e:
|
|
35
|
+
rprint(f"[bold red]Could not start server: {e}[/bold red]\nTry another port: MultiDown --port 8080")
|
|
36
|
+
except KeyboardInterrupt:
|
|
37
|
+
rprint("\n[bold yellow]Stopped.[/bold yellow]")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
if __name__ == "__main__":
|
|
41
|
+
main()
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
import tempfile
|
|
4
|
+
|
|
5
|
+
import yt_dlp
|
|
6
|
+
|
|
7
|
+
# Downloads go to a user-writable temp folder (site-packages may be read-only).
|
|
8
|
+
DOWNLOAD_DIR = os.path.join(tempfile.gettempdir(), "multidown_downloads")
|
|
9
|
+
os.makedirs(DOWNLOAD_DIR, exist_ok=True)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def find_ffmpeg():
|
|
13
|
+
"""Return path to an ffmpeg binary, or None.
|
|
14
|
+
|
|
15
|
+
Order: system ffmpeg first (always correct for your CPU/OS, e.g. Termux,
|
|
16
|
+
Raspberry Pi arm32), then the binary bundled by imageio-ffmpeg.
|
|
17
|
+
"""
|
|
18
|
+
system = shutil.which("ffmpeg")
|
|
19
|
+
if system:
|
|
20
|
+
return system
|
|
21
|
+
try:
|
|
22
|
+
import imageio_ffmpeg
|
|
23
|
+
exe = imageio_ffmpeg.get_ffmpeg_exe()
|
|
24
|
+
if exe and os.path.exists(exe):
|
|
25
|
+
return exe
|
|
26
|
+
except Exception:
|
|
27
|
+
pass
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def download_media(url, format_, quality):
|
|
32
|
+
"""Download `url` as mp3 or mp4. Returns (file_path, error_message)."""
|
|
33
|
+
ffmpeg = find_ffmpeg()
|
|
34
|
+
if ffmpeg is None:
|
|
35
|
+
return None, (
|
|
36
|
+
"ffmpeg was not found. Install it for your system:\n"
|
|
37
|
+
" Termux/Android : pkg install ffmpeg\n"
|
|
38
|
+
" Debian/Ubuntu/Raspberry Pi : sudo apt install ffmpeg\n"
|
|
39
|
+
" Arch : sudo pacman -S ffmpeg\n"
|
|
40
|
+
" macOS : brew install ffmpeg\n"
|
|
41
|
+
" Windows : winget install ffmpeg"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
try:
|
|
45
|
+
quality = int(quality)
|
|
46
|
+
except (TypeError, ValueError):
|
|
47
|
+
quality = 720
|
|
48
|
+
|
|
49
|
+
output_template = os.path.join(DOWNLOAD_DIR, "%(title).150B [%(id)s].%(ext)s")
|
|
50
|
+
|
|
51
|
+
options = {
|
|
52
|
+
"outtmpl": output_template,
|
|
53
|
+
"ffmpeg_location": ffmpeg,
|
|
54
|
+
"noplaylist": True,
|
|
55
|
+
"quiet": True,
|
|
56
|
+
"no_warnings": True,
|
|
57
|
+
"restrictfilenames": False,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if format_ == "mp3":
|
|
61
|
+
options.update({
|
|
62
|
+
"format": "bestaudio/best",
|
|
63
|
+
"postprocessors": [{
|
|
64
|
+
"key": "FFmpegExtractAudio",
|
|
65
|
+
"preferredcodec": "mp3",
|
|
66
|
+
"preferredquality": "192",
|
|
67
|
+
}],
|
|
68
|
+
})
|
|
69
|
+
final_ext = ".mp3"
|
|
70
|
+
else:
|
|
71
|
+
options.update({
|
|
72
|
+
"format": f"bestvideo[height<={quality}]+bestaudio/best[height<={quality}]/best",
|
|
73
|
+
"merge_output_format": "mp4",
|
|
74
|
+
})
|
|
75
|
+
final_ext = ".mp4"
|
|
76
|
+
|
|
77
|
+
try:
|
|
78
|
+
with yt_dlp.YoutubeDL(options) as ydl:
|
|
79
|
+
info = ydl.extract_info(url, download=True)
|
|
80
|
+
|
|
81
|
+
# Prefer the real final path reported by yt-dlp.
|
|
82
|
+
path = None
|
|
83
|
+
downloads = info.get("requested_downloads") or []
|
|
84
|
+
if downloads:
|
|
85
|
+
path = downloads[0].get("filepath")
|
|
86
|
+
if not path:
|
|
87
|
+
path = os.path.splitext(ydl.prepare_filename(info))[0] + final_ext
|
|
88
|
+
elif not path.endswith(final_ext):
|
|
89
|
+
candidate = os.path.splitext(path)[0] + final_ext
|
|
90
|
+
if os.path.exists(candidate):
|
|
91
|
+
path = candidate
|
|
92
|
+
|
|
93
|
+
if os.path.exists(path):
|
|
94
|
+
return path, None
|
|
95
|
+
return None, "Download finished but the output file was not found."
|
|
96
|
+
except Exception as e:
|
|
97
|
+
return None, f"Error downloading media: {e}"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import threading
|
|
3
|
+
import time
|
|
4
|
+
import webbrowser
|
|
5
|
+
|
|
6
|
+
from flask import Flask, request, send_file, Response, abort
|
|
7
|
+
|
|
8
|
+
from .downloader import download_media
|
|
9
|
+
|
|
10
|
+
app = Flask(__name__)
|
|
11
|
+
|
|
12
|
+
_STATIC_INDEX = os.path.join(os.path.dirname(os.path.abspath(__file__)), "static", "index.html")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _load_html():
|
|
16
|
+
with open(_STATIC_INDEX, "r", encoding="utf-8") as f:
|
|
17
|
+
return f.read()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@app.route("/")
|
|
21
|
+
def index():
|
|
22
|
+
return Response(_load_html(), mimetype="text/html")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@app.route("/download", methods=["POST"])
|
|
26
|
+
def download():
|
|
27
|
+
url = (request.form.get("url") or "").strip()
|
|
28
|
+
format_ = request.form.get("format", "mp4")
|
|
29
|
+
quality = request.form.get("quality", "720")
|
|
30
|
+
|
|
31
|
+
if not url.lower().startswith(("http://", "https://")):
|
|
32
|
+
abort(400, "Please enter a valid http(s) video URL.")
|
|
33
|
+
if format_ not in ("mp3", "mp4"):
|
|
34
|
+
abort(400, "Invalid format.")
|
|
35
|
+
|
|
36
|
+
file_path, error = download_media(url, format_, quality)
|
|
37
|
+
|
|
38
|
+
if file_path and os.path.exists(file_path):
|
|
39
|
+
def delayed_delete(path):
|
|
40
|
+
time.sleep(60) # give the browser time to finish the transfer
|
|
41
|
+
try:
|
|
42
|
+
os.remove(path)
|
|
43
|
+
except OSError:
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
threading.Thread(target=delayed_delete, args=(file_path,), daemon=True).start()
|
|
47
|
+
return send_file(file_path, as_attachment=True, conditional=True)
|
|
48
|
+
|
|
49
|
+
message = error or "Failed to download the media. Check the link or format."
|
|
50
|
+
return Response(f"<pre>❌ {message}</pre>", status=500, mimetype="text/html")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def start_server(host="127.0.0.1", port=8000, open_browser=True):
|
|
54
|
+
url = f"http://{host}:{port}"
|
|
55
|
+
if open_browser:
|
|
56
|
+
threading.Timer(1.2, lambda: webbrowser.open(url)).start()
|
|
57
|
+
print(f"Serving on {url} (Ctrl+C to stop)")
|
|
58
|
+
app.run(host=host, port=port, threaded=True)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MultiDown
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: A stylish cross-platform video downloader with a local web UI (works on every CPU architecture)
|
|
5
|
+
Author: Bismoy Ghosh
|
|
6
|
+
License: Copyright (c) 2025 Bismoy Ghosh
|
|
7
|
+
|
|
8
|
+
All rights reserved.
|
|
9
|
+
|
|
10
|
+
This software and its associated files are the proprietary property of Bismoy Ghosh. Unauthorized copying, modification, distribution, use, or reverse engineering of any part of this software, in any form, is strictly prohibited.
|
|
11
|
+
|
|
12
|
+
Only the original author, Bismoy Ghosh, is permitted to:
|
|
13
|
+
- Copy, modify, or distribute the software
|
|
14
|
+
- Use it for any purpose, including commercial, academic, or personal
|
|
15
|
+
|
|
16
|
+
No license or permission is granted to any other individual or entity. Violation of these terms may result in legal action under applicable copyright and intellectual property laws.
|
|
17
|
+
|
|
18
|
+
For licensing requests or permission, contact:
|
|
19
|
+
bishoyghosh@gmail.com
|
|
20
|
+
Keywords: video,downloader,yt-dlp,mp3,mp4,flask
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: License :: Other/Proprietary License
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Classifier: Environment :: Web Environment
|
|
25
|
+
Classifier: Topic :: Multimedia :: Video
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: flask
|
|
30
|
+
Requires-Dist: yt-dlp
|
|
31
|
+
Requires-Dist: rich
|
|
32
|
+
Requires-Dist: colorama
|
|
33
|
+
Requires-Dist: imageio-ffmpeg
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# MultiDown
|
|
37
|
+
|
|
38
|
+
A stylish video downloader with a local web UI, powered by yt-dlp.
|
|
39
|
+
Pure Python, so it installs on **any CPU architecture**: aarch64/arm64, arm32 (armv7), x86, x86_64.
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
```bash
|
|
43
|
+
pip install --upgrade MultiDown
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Run
|
|
47
|
+
```bash
|
|
48
|
+
MultiDown # opens http://127.0.0.1:8000
|
|
49
|
+
MultiDown --port 8080 --no-browser
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## ffmpeg
|
|
53
|
+
MP3 conversion and MP4 merging need ffmpeg. MultiDown uses your system ffmpeg first,
|
|
54
|
+
then a bundled one if available.
|
|
55
|
+
- Termux: `pkg install ffmpeg`
|
|
56
|
+
- Debian/Ubuntu/Raspberry Pi: `sudo apt install ffmpeg`
|
|
57
|
+
- Arch: `sudo pacman -S ffmpeg`
|
|
58
|
+
|
|
59
|
+
Author: Bismoy Ghosh
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
-
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
3
5
|
MultiDown/__init__.py
|
|
4
6
|
MultiDown/__main__.py
|
|
5
7
|
MultiDown/downloader.py
|
|
@@ -9,4 +11,5 @@ MultiDown.egg-info/SOURCES.txt
|
|
|
9
11
|
MultiDown.egg-info/dependency_links.txt
|
|
10
12
|
MultiDown.egg-info/entry_points.txt
|
|
11
13
|
MultiDown.egg-info/requires.txt
|
|
12
|
-
MultiDown.egg-info/top_level.txt
|
|
14
|
+
MultiDown.egg-info/top_level.txt
|
|
15
|
+
MultiDown/static/index.html
|
multidown-0.5.0/PKG-INFO
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MultiDown
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: A stylish cross-platform video downloader with a local web UI (works on every CPU architecture)
|
|
5
|
+
Author: Bismoy Ghosh
|
|
6
|
+
License: Copyright (c) 2025 Bismoy Ghosh
|
|
7
|
+
|
|
8
|
+
All rights reserved.
|
|
9
|
+
|
|
10
|
+
This software and its associated files are the proprietary property of Bismoy Ghosh. Unauthorized copying, modification, distribution, use, or reverse engineering of any part of this software, in any form, is strictly prohibited.
|
|
11
|
+
|
|
12
|
+
Only the original author, Bismoy Ghosh, is permitted to:
|
|
13
|
+
- Copy, modify, or distribute the software
|
|
14
|
+
- Use it for any purpose, including commercial, academic, or personal
|
|
15
|
+
|
|
16
|
+
No license or permission is granted to any other individual or entity. Violation of these terms may result in legal action under applicable copyright and intellectual property laws.
|
|
17
|
+
|
|
18
|
+
For licensing requests or permission, contact:
|
|
19
|
+
bishoyghosh@gmail.com
|
|
20
|
+
Keywords: video,downloader,yt-dlp,mp3,mp4,flask
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: License :: Other/Proprietary License
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Classifier: Environment :: Web Environment
|
|
25
|
+
Classifier: Topic :: Multimedia :: Video
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: flask
|
|
30
|
+
Requires-Dist: yt-dlp
|
|
31
|
+
Requires-Dist: rich
|
|
32
|
+
Requires-Dist: colorama
|
|
33
|
+
Requires-Dist: imageio-ffmpeg
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# MultiDown
|
|
37
|
+
|
|
38
|
+
A stylish video downloader with a local web UI, powered by yt-dlp.
|
|
39
|
+
Pure Python, so it installs on **any CPU architecture**: aarch64/arm64, arm32 (armv7), x86, x86_64.
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
```bash
|
|
43
|
+
pip install --upgrade MultiDown
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Run
|
|
47
|
+
```bash
|
|
48
|
+
MultiDown # opens http://127.0.0.1:8000
|
|
49
|
+
MultiDown --port 8080 --no-browser
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## ffmpeg
|
|
53
|
+
MP3 conversion and MP4 merging need ffmpeg. MultiDown uses your system ffmpeg first,
|
|
54
|
+
then a bundled one if available.
|
|
55
|
+
- Termux: `pkg install ffmpeg`
|
|
56
|
+
- Debian/Ubuntu/Raspberry Pi: `sudo apt install ffmpeg`
|
|
57
|
+
- Arch: `sudo pacman -S ffmpeg`
|
|
58
|
+
|
|
59
|
+
Author: Bismoy Ghosh
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# MultiDown
|
|
2
|
+
|
|
3
|
+
A stylish video downloader with a local web UI, powered by yt-dlp.
|
|
4
|
+
Pure Python, so it installs on **any CPU architecture**: aarch64/arm64, arm32 (armv7), x86, x86_64.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
```bash
|
|
8
|
+
pip install --upgrade MultiDown
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Run
|
|
12
|
+
```bash
|
|
13
|
+
MultiDown # opens http://127.0.0.1:8000
|
|
14
|
+
MultiDown --port 8080 --no-browser
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## ffmpeg
|
|
18
|
+
MP3 conversion and MP4 merging need ffmpeg. MultiDown uses your system ffmpeg first,
|
|
19
|
+
then a bundled one if available.
|
|
20
|
+
- Termux: `pkg install ffmpeg`
|
|
21
|
+
- Debian/Ubuntu/Raspberry Pi: `sudo apt install ffmpeg`
|
|
22
|
+
- Arch: `sudo pacman -S ffmpeg`
|
|
23
|
+
|
|
24
|
+
Author: Bismoy Ghosh
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "MultiDown"
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
description = "A stylish cross-platform video downloader with a local web UI (works on every CPU architecture)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
authors = [{ name = "Bismoy Ghosh" }]
|
|
13
|
+
keywords = ["video", "downloader", "yt-dlp", "mp3", "mp4", "flask"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: Other/Proprietary License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Environment :: Web Environment",
|
|
19
|
+
"Topic :: Multimedia :: Video",
|
|
20
|
+
]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"flask",
|
|
23
|
+
"yt-dlp",
|
|
24
|
+
"rich",
|
|
25
|
+
"colorama",
|
|
26
|
+
# Bundled ffmpeg binary where a wheel exists (x86_64, aarch64, Windows, macOS).
|
|
27
|
+
# On other CPUs (arm32, x86 Linux, Termux) MultiDown falls back to system ffmpeg.
|
|
28
|
+
"imageio-ffmpeg",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.scripts]
|
|
32
|
+
MultiDown = "MultiDown.__main__:main"
|
|
33
|
+
multidown = "MultiDown.__main__:main"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools]
|
|
36
|
+
include-package-data = true
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
include = ["MultiDown*"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
MultiDown = ["static/*.html"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
File without changes
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from .webapp import start_server
|
|
2
|
-
from rich import print
|
|
3
|
-
import time
|
|
4
|
-
|
|
5
|
-
banner = """[bold cyan]
|
|
6
|
-
██████╗ ██╗ ██╗███╗ ██╗██╗ ██████╗ ██████╗
|
|
7
|
-
██╔══██╗██║ ██║████╗ ██║██║ ██╔══██╗██╔══██╗
|
|
8
|
-
██████╔╝██║ █╗ ██║██╔██╗ ██║██║ ██║ ██║██████╔╝
|
|
9
|
-
██╔═══╝ ██║███╗██║██║╚██╗██║██║ ██║ ██║██╔═══╝
|
|
10
|
-
██║ ╚███╔███╔╝██║ ╚████║███████╗██████╔╝██║
|
|
11
|
-
╚═╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝╚═════╝ ╚═╝
|
|
12
|
-
[/bold cyan]
|
|
13
|
-
"""
|
|
14
|
-
author ="""[bold cyan]
|
|
15
|
-
AUTHOR:BISMOY GHOSH
|
|
16
|
-
Thanks for using
|
|
17
|
-
[/bold cyan]
|
|
18
|
-
"""
|
|
19
|
-
def main():
|
|
20
|
-
print(banner)
|
|
21
|
-
print(author)
|
|
22
|
-
print("[bold green]Launching local web UI...[/bold green]")
|
|
23
|
-
start_server()
|
|
24
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import yt_dlp
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
# Set fixed download directory inside your package
|
|
5
|
-
DOWNLOAD_DIR = os.path.join(os.path.dirname(__file__), "downloads")
|
|
6
|
-
os.makedirs(DOWNLOAD_DIR, exist_ok=True)
|
|
7
|
-
|
|
8
|
-
def download_media(url, format_, quality):
|
|
9
|
-
output_template = os.path.join(DOWNLOAD_DIR, '%(title)s.%(ext)s')
|
|
10
|
-
|
|
11
|
-
# Configure yt-dlp options
|
|
12
|
-
if format_ == "mp3":
|
|
13
|
-
options = {
|
|
14
|
-
'format': 'bestaudio/best',
|
|
15
|
-
'outtmpl': output_template,
|
|
16
|
-
'postprocessors': [{
|
|
17
|
-
'key': 'FFmpegExtractAudio',
|
|
18
|
-
'preferredcodec': 'mp3',
|
|
19
|
-
'preferredquality': '192',
|
|
20
|
-
}]
|
|
21
|
-
}
|
|
22
|
-
else: # MP4 video
|
|
23
|
-
options = {
|
|
24
|
-
'format': f"bestvideo[height<={quality}]+bestaudio/best",
|
|
25
|
-
'outtmpl': output_template,
|
|
26
|
-
'merge_output_format': 'mp4',
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
try:
|
|
30
|
-
with yt_dlp.YoutubeDL(options) as ydl:
|
|
31
|
-
info = ydl.extract_info(url, download=True)
|
|
32
|
-
filename = ydl.prepare_filename(info)
|
|
33
|
-
|
|
34
|
-
# If MP3, replace extension
|
|
35
|
-
if format_ == "mp3":
|
|
36
|
-
filename = os.path.splitext(filename)[0] + ".mp3"
|
|
37
|
-
elif format_ == "mp4":
|
|
38
|
-
filename = os.path.splitext(filename)[0] + ".mp4"
|
|
39
|
-
|
|
40
|
-
return filename # Full path to the file
|
|
41
|
-
|
|
42
|
-
except Exception as e:
|
|
43
|
-
print(f"❌ Error downloading media: {e}")
|
|
44
|
-
return None
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import threading
|
|
2
|
-
import webbrowser
|
|
3
|
-
import os
|
|
4
|
-
import time
|
|
5
|
-
from flask import Flask, request, render_template_string, send_file
|
|
6
|
-
from .downloader import download_media
|
|
7
|
-
|
|
8
|
-
app = Flask(__name__)
|
|
9
|
-
|
|
10
|
-
# Load HTML from static/index.html
|
|
11
|
-
with open(__file__.replace("webapp.py", "static/index.html")) as f:
|
|
12
|
-
HTML_TEMPLATE = f.read()
|
|
13
|
-
|
|
14
|
-
@app.route('/')
|
|
15
|
-
def index():
|
|
16
|
-
return render_template_string(HTML_TEMPLATE)
|
|
17
|
-
|
|
18
|
-
@app.route('/download', methods=['POST'])
|
|
19
|
-
def download():
|
|
20
|
-
url = request.form.get('url')
|
|
21
|
-
format_ = request.form.get('format')
|
|
22
|
-
quality = request.form.get('quality', '720')
|
|
23
|
-
|
|
24
|
-
file_path = download_media(url, format_, quality)
|
|
25
|
-
|
|
26
|
-
if file_path and os.path.exists(file_path):
|
|
27
|
-
def delayed_delete(path):
|
|
28
|
-
# Wait a few seconds to ensure browser finishes download
|
|
29
|
-
time.sleep(10)
|
|
30
|
-
try:
|
|
31
|
-
os.remove(path)
|
|
32
|
-
print(f"✅ Deleted file: {path}")
|
|
33
|
-
except Exception as e:
|
|
34
|
-
print(f"❌ Error deleting file: {e}")
|
|
35
|
-
|
|
36
|
-
# Schedule deletion in background
|
|
37
|
-
threading.Thread(target=delayed_delete, args=(file_path,), daemon=True).start()
|
|
38
|
-
|
|
39
|
-
return send_file(file_path, as_attachment=True, conditional=True)
|
|
40
|
-
|
|
41
|
-
return "<pre>❌ Failed to download the media. Check the link or format.</pre>"
|
|
42
|
-
|
|
43
|
-
def start_server():
|
|
44
|
-
threading.Thread(target=lambda: app.run(port=8000)).start()
|
|
45
|
-
webbrowser.open("http://localhost:8000")
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: MultiDown
|
|
3
|
-
Version: 0.3.1
|
|
4
|
-
Summary: A stylish cross-platform video downloader with web UI
|
|
5
|
-
Author: Bismoy Ghosh
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Requires-Dist: flask
|
|
8
|
-
Requires-Dist: yt-dlp
|
|
9
|
-
Requires-Dist: rich
|
|
10
|
-
Requires-Dist: colorama
|
|
11
|
-
Requires-Dist: ffmpeg-python
|
|
12
|
-
Dynamic: author
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
Dynamic: requires-dist
|
|
15
|
-
Dynamic: summary
|
multidown-0.3.1/PKG-INFO
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: MultiDown
|
|
3
|
-
Version: 0.3.1
|
|
4
|
-
Summary: A stylish cross-platform video downloader with web UI
|
|
5
|
-
Author: Bismoy Ghosh
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Requires-Dist: flask
|
|
8
|
-
Requires-Dist: yt-dlp
|
|
9
|
-
Requires-Dist: rich
|
|
10
|
-
Requires-Dist: colorama
|
|
11
|
-
Requires-Dist: ffmpeg-python
|
|
12
|
-
Dynamic: author
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
Dynamic: requires-dist
|
|
15
|
-
Dynamic: summary
|
multidown-0.3.1/setup.py
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
from setuptools import setup, find_packages
|
|
2
|
-
|
|
3
|
-
import platform
|
|
4
|
-
import sys
|
|
5
|
-
from setuptools import setup, find_packages
|
|
6
|
-
|
|
7
|
-
def check_arch():
|
|
8
|
-
machine = platform.machine().lower()
|
|
9
|
-
|
|
10
|
-
# Linux / Android ARM64
|
|
11
|
-
if machine in ("aarch64", "arm64"):
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
print("\n❌ This package supports ONLY ARM64 (aarch64) systems.")
|
|
15
|
-
print(f"❌ Detected architecture: {machine}")
|
|
16
|
-
print("❌ Installation aborted.\n")
|
|
17
|
-
sys.exit(1)
|
|
18
|
-
|
|
19
|
-
check_arch()
|
|
20
|
-
|
|
21
|
-
setup(
|
|
22
|
-
name='MultiDown',
|
|
23
|
-
version='0.3.1',
|
|
24
|
-
description='A stylish cross-platform video downloader with web UI',
|
|
25
|
-
author='Bismoy Ghosh',
|
|
26
|
-
packages=find_packages(),
|
|
27
|
-
include_package_data=True,
|
|
28
|
-
install_requires=[
|
|
29
|
-
'flask',
|
|
30
|
-
'yt-dlp',
|
|
31
|
-
'rich',
|
|
32
|
-
'colorama',
|
|
33
|
-
'ffmpeg-python'
|
|
34
|
-
],
|
|
35
|
-
entry_points={
|
|
36
|
-
'console_scripts': [
|
|
37
|
-
'MultiDown = MultiDown.__main__:main',
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|