DDownloader 0.3.4__tar.gz → 0.3.6__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.
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/main.py +5 -0
- ddownloader-0.3.6/DDownloader/modules/__init__.py +1 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/modules/banners.py +7 -7
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/modules/downloader.py +46 -2
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader.egg-info/PKG-INFO +2 -5
- {ddownloader-0.3.4 → ddownloader-0.3.6}/PKG-INFO +2 -5
- {ddownloader-0.3.4 → ddownloader-0.3.6}/README.md +1 -4
- {ddownloader-0.3.4 → ddownloader-0.3.6}/pyproject.toml +2 -2
- ddownloader-0.3.4/DDownloader/modules/__init__.py +0 -1
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/__init__.py +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/modules/args_parser.py +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/modules/helper.py +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader/modules/streamlink.py +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader.egg-info/SOURCES.txt +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader.egg-info/dependency_links.txt +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader.egg-info/entry_points.txt +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/DDownloader.egg-info/top_level.txt +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/LICENSE +0 -0
- {ddownloader-0.3.4 → ddownloader-0.3.6}/setup.cfg +0 -0
@@ -80,6 +80,11 @@ def main():
|
|
80
80
|
logger.info("HLS stream detected. Initializing HLS downloader...")
|
81
81
|
elif re.search(r"\.ism\b", args.url, re.IGNORECASE):
|
82
82
|
logger.info("ISM (Smooth Streaming) detected. Initializing ISM downloader...")
|
83
|
+
elif re.search(r"\.mp4\b", args.url, re.IGNORECASE):
|
84
|
+
logger.info("MP4 file detected. Processing media information...")
|
85
|
+
print(Fore.RED + "═" * 100 + Fore.RESET)
|
86
|
+
downloader.normal_downloader(args.url, os.path.join(downloads_dir, args.output))
|
87
|
+
exit(1)
|
83
88
|
else:
|
84
89
|
logger.error("Unsupported URL format. Please provide a valid DASH (.mpd), HLS (.m3u8), or ISM (.ism) URL.")
|
85
90
|
exit(1)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.3.6"
|
@@ -11,19 +11,19 @@ def clear_screen():
|
|
11
11
|
|
12
12
|
def banners():
|
13
13
|
stdout.write(" \n")
|
14
|
-
stdout.write(""+Fore.LIGHTRED_EX +"██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ██╗██╗ ██████╗ █████╗ ██████╗
|
15
|
-
stdout.write(""+Fore.LIGHTRED_EX +"██╔══██╗██╔══██╗██╔═══██╗██║ ██║████╗ ██║██║
|
16
|
-
stdout.write(""+Fore.LIGHTRED_EX +"██║ ██║██║ ██║██║ ██║██║ █╗ ██║██╔██╗ ██║██║ ██║ ██║███████║██║
|
17
|
-
stdout.write(""+Fore.LIGHTRED_EX +"██║ ██║██║ ██║██║ ██║██║███╗██║██║╚██╗██║██║ ██║ ██║██╔══██║██║
|
18
|
-
stdout.write(""+Fore.LIGHTRED_EX +"██████╔╝██████╔╝╚██████╔╝╚███╔███╔╝██║ ╚████║███████╗╚██████╔╝██║
|
19
|
-
stdout.write(""+Fore.LIGHTRED_EX +"╚═════╝ ╚═════╝ ╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝
|
14
|
+
stdout.write(""+Fore.LIGHTRED_EX +"██████╗ ██████╗ ██████╗ ██╗ ██╗███╗ ██╗██╗ ██████╗ █████╗ ██████╗ ███████╗██████╗ \n")
|
15
|
+
stdout.write(""+Fore.LIGHTRED_EX +"██╔══██╗██╔══██╗██╔═══██╗██║ ██║████╗ ██║██║ ██╔═══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗\n")
|
16
|
+
stdout.write(""+Fore.LIGHTRED_EX +"██║ ██║██║ ██║██║ ██║██║ █╗ ██║██╔██╗ ██║██║ ██║ ██║███████║██║ ██║█████╗ ██████╔╝\n")
|
17
|
+
stdout.write(""+Fore.LIGHTRED_EX +"██║ ██║██║ ██║██║ ██║██║███╗██║██║╚██╗██║██║ ██║ ██║██╔══██║██║ ██║██╔══╝ ██╔══██╗\n")
|
18
|
+
stdout.write(""+Fore.LIGHTRED_EX +"██████╔╝██████╔╝╚██████╔╝╚███╔███╔╝██║ ╚████║███████╗╚██████╔╝██║ ██║██████╔╝███████╗██║ ██║\n")
|
19
|
+
stdout.write(""+Fore.LIGHTRED_EX +"╚═════╝ ╚═════╝ ╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝\n")
|
20
20
|
stdout.write(""+Fore.YELLOW +"═════════════╦═════════════════════════════════╦══════════════════════════════\n")
|
21
21
|
stdout.write(""+Fore.YELLOW +"╔════════════╩═════════════════════════════════╩═════════════════════════════╗\n")
|
22
22
|
stdout.write(""+Fore.YELLOW +"║ \x1b[38;2;255;20;147m• "+Fore.GREEN+"AUTHOR "+Fore.RED+" |"+Fore.LIGHTWHITE_EX+" PARI MALAM "+Fore.YELLOW+"║\n")
|
23
23
|
stdout.write(""+Fore.YELLOW +"╔════════════════════════════════════════════════════════════════════════════╝\n")
|
24
24
|
stdout.write(""+Fore.YELLOW +"║ \x1b[38;2;255;20;147m• "+Fore.GREEN+"GITHUB "+Fore.RED+" |"+Fore.LIGHTWHITE_EX+" GITHUB.COM/THATNOTEASY "+Fore.YELLOW+"║\n")
|
25
25
|
stdout.write(""+Fore.YELLOW +"╚════════════════════════════════════════════════════════════════════════════╝\n")
|
26
|
-
print(f"{Fore.YELLOW}[DDownloader] - {Fore.GREEN}A DRM-Protected Content Downloader - {Fore.RED}[V0.3.
|
26
|
+
print(f"{Fore.YELLOW}[DDownloader] - {Fore.GREEN}A DRM-Protected & Non-Protected Content Downloader - {Fore.RED}[V0.3.6] \n{Fore.RESET}")
|
27
27
|
|
28
28
|
# =========================================================================================================== #
|
29
29
|
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import os
|
1
|
+
import os, requests
|
2
2
|
import subprocess
|
3
3
|
import logging
|
4
4
|
import platform
|
5
5
|
import coloredlogs
|
6
|
+
from tqdm import tqdm
|
6
7
|
from colorama import Fore
|
7
8
|
|
8
9
|
logger = logging.getLogger(Fore.RED + "+ DDOWNLOADER + ")
|
@@ -156,4 +157,47 @@ class DOWNLOADER:
|
|
156
157
|
return output_file
|
157
158
|
else:
|
158
159
|
logger.error(f"Re-encoding failed. Output file not created: {output_file}")
|
159
|
-
return None
|
160
|
+
return None
|
161
|
+
|
162
|
+
# =========================================================================================================== #
|
163
|
+
|
164
|
+
def normal_downloader(self, url, output_file):
|
165
|
+
"""
|
166
|
+
Download a video file from a given URL with a progress bar.
|
167
|
+
Automatically adds .mp4 extension if missing.
|
168
|
+
|
169
|
+
Args:
|
170
|
+
url (str): The video URL to download.
|
171
|
+
output_file (str): The output file path to save the video.
|
172
|
+
"""
|
173
|
+
try:
|
174
|
+
# Add .mp4 extension if not already present
|
175
|
+
if not output_file.lower().endswith(".mp4"):
|
176
|
+
output_file += ".mp4"
|
177
|
+
|
178
|
+
# Send a GET request to the URL with stream=True
|
179
|
+
response = requests.get(url, stream=True)
|
180
|
+
response.raise_for_status() # Raise an exception for HTTP errors
|
181
|
+
|
182
|
+
# Get the total file size from the headers
|
183
|
+
total_size = int(response.headers.get('content-length', 0))
|
184
|
+
|
185
|
+
# Open the output file in binary write mode
|
186
|
+
with open(output_file, 'wb') as file:
|
187
|
+
# Use tqdm to show a progress bar
|
188
|
+
with tqdm(
|
189
|
+
total=total_size,
|
190
|
+
unit='B',
|
191
|
+
unit_scale=True,
|
192
|
+
unit_divisor=1024,
|
193
|
+
desc=f"Downloading {os.path.basename(output_file)}",
|
194
|
+
) as progress:
|
195
|
+
# Write the content in chunks
|
196
|
+
for chunk in response.iter_content(chunk_size=1024):
|
197
|
+
file.write(chunk)
|
198
|
+
progress.update(len(chunk))
|
199
|
+
|
200
|
+
print(f"Download complete: {output_file}")
|
201
|
+
|
202
|
+
except requests.exceptions.RequestException as e:
|
203
|
+
print(f"Error during download: {e}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: DDownloader
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.6
|
4
4
|
Summary: A downloader for DRM-protected content.
|
5
5
|
Author-email: ThatNotEasy <apidotmy@proton.me>
|
6
6
|
License: MIT License
|
@@ -124,7 +124,4 @@ _DDownloader is a powerful Python-based tool and library designed to download an
|
|
124
124
|
DDownloader -h
|
125
125
|
```
|
126
126
|
|
127
|
-
- 
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: DDownloader
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.6
|
4
4
|
Summary: A downloader for DRM-protected content.
|
5
5
|
Author-email: ThatNotEasy <apidotmy@proton.me>
|
6
6
|
License: MIT License
|
@@ -124,7 +124,4 @@ _DDownloader is a powerful Python-based tool and library designed to download an
|
|
124
124
|
DDownloader -h
|
125
125
|
```
|
126
126
|
|
127
|
-
- 
|
@@ -86,7 +86,4 @@ _DDownloader is a powerful Python-based tool and library designed to download an
|
|
86
86
|
DDownloader -h
|
87
87
|
```
|
88
88
|
|
89
|
-
- 
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "DDownloader"
|
7
|
-
version = "0.3.
|
7
|
+
version = "0.3.6"
|
8
8
|
description = "A downloader for DRM-protected content."
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
10
10
|
authors = [
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
25
25
|
|
26
26
|
[tool.poetry]
|
27
27
|
name = "DDownloader"
|
28
|
-
version = "0.3.
|
28
|
+
version = "0.3.6"
|
29
29
|
description = "A downloader for DRM-protected content."
|
30
30
|
authors = ["ThatNotEasy <apidotmy@proton.me>"]
|
31
31
|
license = "MIT"
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.3.4"
|
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
|