DDownloader 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl
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/bin/aria2c.exe +0 -0
- DDownloader/bin/mp4decrypt.exe +0 -0
- DDownloader/bin/shaka-packager.exe +0 -0
- DDownloader/main.py +19 -1
- DDownloader/modules/__init__.py +1 -1
- DDownloader/modules/args_parser.py +4 -0
- DDownloader/modules/banners.py +2 -1
- DDownloader/modules/downloader.py +76 -0
- {ddownloader-0.4.0.dist-info → ddownloader-0.4.2.dist-info}/METADATA +3 -2
- ddownloader-0.4.2.dist-info/RECORD +20 -0
- {ddownloader-0.4.0.dist-info → ddownloader-0.4.2.dist-info}/WHEEL +1 -1
- ddownloader-0.4.0.dist-info/RECORD +0 -20
- {ddownloader-0.4.0.dist-info → ddownloader-0.4.2.dist-info}/entry_points.txt +0 -0
- {ddownloader-0.4.0.dist-info → ddownloader-0.4.2.dist-info/licenses}/LICENSE +0 -0
DDownloader/bin/aria2c.exe
CHANGED
Binary file
|
DDownloader/bin/mp4decrypt.exe
CHANGED
Binary file
|
Binary file
|
DDownloader/main.py
CHANGED
@@ -71,6 +71,7 @@ def main():
|
|
71
71
|
exit(1)
|
72
72
|
|
73
73
|
downloader = DOWNLOADER()
|
74
|
+
downloader.auto_select = args.auto_select
|
74
75
|
|
75
76
|
if args.url:
|
76
77
|
if re.search(r"\.mpd\b", args.url, re.IGNORECASE):
|
@@ -88,6 +89,7 @@ def main():
|
|
88
89
|
logger.info("YouTube URL detected. Initializing YouTube downloader...")
|
89
90
|
print(Fore.RED + "═" * 100 + Fore.RESET)
|
90
91
|
is_playlist = "list=" in args.url
|
92
|
+
downloader.cookies = args.cookies
|
91
93
|
downloader.youtube_downloader(
|
92
94
|
url=args.url,
|
93
95
|
output_file=os.path.join(downloads_dir, args.output),
|
@@ -95,8 +97,20 @@ def main():
|
|
95
97
|
playlist=is_playlist
|
96
98
|
)
|
97
99
|
exit(0)
|
100
|
+
elif re.search(r"iq\.com", args.url, re.IGNORECASE):
|
101
|
+
logger.info("IQ.com URL detected. Initializing IQ.com downloader...")
|
102
|
+
print(Fore.RED + "═" * 100 + Fore.RESET)
|
103
|
+
# Set default output name if not provided
|
104
|
+
output_name = args.output if args.output else "iq_video"
|
105
|
+
downloader.cookies = args.cookies
|
106
|
+
downloader.iq_downloader(
|
107
|
+
url=args.url,
|
108
|
+
output_file=os.path.join(downloads_dir, output_name),
|
109
|
+
download_type="mp4"
|
110
|
+
)
|
111
|
+
exit(0)
|
98
112
|
else:
|
99
|
-
logger.error("Unsupported URL format. Please provide a valid DASH (.mpd), HLS (.m3u8), ISM (.ism), or
|
113
|
+
logger.error("Unsupported URL format. Please provide a valid DASH (.mpd), HLS (.m3u8), ISM (.ism), YouTube, or IQ.com URL.")
|
100
114
|
exit(1)
|
101
115
|
|
102
116
|
downloader.manifest_url = args.url
|
@@ -122,6 +136,10 @@ def main():
|
|
122
136
|
for key in downloader.decryption_keys:
|
123
137
|
logger.info(f" - {key}")
|
124
138
|
print(Fore.RED + "═" * 100 + Fore.RESET + "\n")
|
139
|
+
|
140
|
+
if downloader.auto_select:
|
141
|
+
logger.info("Auto-select enabled - will choose best quality automatically")
|
142
|
+
print(Fore.RED + "═" * 100 + Fore.RESET + "\n")
|
125
143
|
|
126
144
|
try:
|
127
145
|
downloader.drm_downloader()
|
DDownloader/modules/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.4.
|
1
|
+
__version__ = "0.4.2"
|
@@ -15,8 +15,12 @@ def parse_arguments():
|
|
15
15
|
parser.add_argument("-o", "--output", help=argparse.SUPPRESS)
|
16
16
|
parser.add_argument("-k", "--key", action="append", help=argparse.SUPPRESS)
|
17
17
|
parser.add_argument("-H", "--header", action="append", help=argparse.SUPPRESS)
|
18
|
+
parser.add_argument("-c", "--cookies", help=argparse.SUPPRESS)
|
18
19
|
parser.add_argument("-i", "--input", help=argparse.SUPPRESS)
|
19
20
|
parser.add_argument("-q", "--quality", help=argparse.SUPPRESS)
|
21
|
+
parser.add_argument("--auto-select",
|
22
|
+
action="store_true",
|
23
|
+
help=argparse.SUPPRESS)
|
20
24
|
parser.add_argument(
|
21
25
|
"-h", "--help",
|
22
26
|
action="help",
|
DDownloader/modules/banners.py
CHANGED
@@ -23,7 +23,7 @@ def banners():
|
|
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 & Non-Protected Content Downloader - {Fore.RED}[V0.4.
|
26
|
+
print(f"{Fore.YELLOW}[DDownloader] - {Fore.GREEN}A DRM-Protected & Non-Protected Content Downloader - {Fore.RED}[V0.4.2] \n{Fore.RESET}")
|
27
27
|
|
28
28
|
# =========================================================================================================== #
|
29
29
|
|
@@ -45,6 +45,7 @@ def display_help():
|
|
45
45
|
f" {Fore.GREEN}-o, --output{' ' * 19}{Style.RESET_ALL}Name of the output file 💾\n"
|
46
46
|
f" {Fore.GREEN}-k, --key{' ' * 22}{Style.RESET_ALL}Decryption key in KID:KEY format 🔑\n"
|
47
47
|
f" {Fore.GREEN}-H, --header{' ' * 19}{Style.RESET_ALL}Custom HTTP headers (e.g., User-Agent: value) 📋\n"
|
48
|
+
f" {Fore.GREEN}-c, --cookies{' ' * 19}{Style.RESET_ALL}Cookies file (e.g., netscape/json formatter) 📋\n"
|
48
49
|
f"{Fore.RED}.++" + "═" * 100 + f"++.{Style.RESET_ALL}\n"
|
49
50
|
f" {Fore.GREEN}-i, --input{' ' * 20}{Style.RESET_ALL}Input file for re-encoding. 📂\n"
|
50
51
|
f" {Fore.GREEN}-q, --quality{' ' * 18}{Style.RESET_ALL}Target quality: HD, FHD, UHD. 🎥\n"
|
@@ -16,7 +16,9 @@ class DOWNLOADER:
|
|
16
16
|
self.proxy = None
|
17
17
|
self.decryption_keys = []
|
18
18
|
self.headers = []
|
19
|
+
self.cookies = None
|
19
20
|
self.binary_path = None
|
21
|
+
self.auto_select = False
|
20
22
|
|
21
23
|
# =========================================================================================================== #
|
22
24
|
|
@@ -94,6 +96,9 @@ class DOWNLOADER:
|
|
94
96
|
if not self.proxy.startswith("http://"):
|
95
97
|
self.proxy = f"http://{self.proxy}"
|
96
98
|
command.extend(['--custom-proxy', f'"{self.proxy}"'])
|
99
|
+
|
100
|
+
if self.auto_select:
|
101
|
+
command.extend(['--auto-select'])
|
97
102
|
|
98
103
|
for header in self.headers:
|
99
104
|
command.extend(['-H', f'"{header}"'])
|
@@ -116,6 +121,73 @@ class DOWNLOADER:
|
|
116
121
|
except Exception as e:
|
117
122
|
logger.error(Fore.RED + f"An unexpected error occurred: {e}" + Fore.RESET)
|
118
123
|
|
124
|
+
# =========================================================================================================== #
|
125
|
+
|
126
|
+
def iq_downloader(self, url, output_file, download_type="mp4"):
|
127
|
+
"""
|
128
|
+
Download a video from IQ.com using yt-dlp.
|
129
|
+
|
130
|
+
Args:
|
131
|
+
url (str): The IQ.com video URL.
|
132
|
+
output_file (str): The output file path to save the video.
|
133
|
+
download_type (str): The type of download ("mp4" for video, "mp3" for audio).
|
134
|
+
"""
|
135
|
+
try:
|
136
|
+
# Get the yt-dlp binary path
|
137
|
+
yt_dlp_path = self._get_binary_path("yt-dlp")
|
138
|
+
|
139
|
+
# Determine the output file extension based on download type
|
140
|
+
if download_type == "mp3":
|
141
|
+
output_file = os.path.splitext(output_file)[0] + ".mp3"
|
142
|
+
elif download_type == "mp4":
|
143
|
+
output_file = os.path.splitext(output_file)[0] + ".mp4"
|
144
|
+
else:
|
145
|
+
logger.error(Fore.RED + f"Invalid download type: {download_type}. Use 'mp4' or 'mp3'." + Fore.RESET)
|
146
|
+
return
|
147
|
+
|
148
|
+
# Build the yt-dlp command for IQ.com
|
149
|
+
command = [
|
150
|
+
yt_dlp_path,
|
151
|
+
"-o", f"\"{output_file}\"", # Output file
|
152
|
+
"--no-check-certificate", # Bypass certificate verification
|
153
|
+
"--ignore-errors", # Ignore errors and continue downloading
|
154
|
+
]
|
155
|
+
|
156
|
+
# Add cookies if provided
|
157
|
+
if self.cookies:
|
158
|
+
command.extend(["--cookies", f"\"{self.cookies}\""])
|
159
|
+
|
160
|
+
# Add audio extraction options if downloading MP3
|
161
|
+
if download_type == "mp3":
|
162
|
+
command.extend([
|
163
|
+
"--extract-audio", # Extract audio
|
164
|
+
"--audio-format", "mp3", # Convert to MP3
|
165
|
+
"--audio-quality", "0", # Best quality
|
166
|
+
])
|
167
|
+
else:
|
168
|
+
# For MP4, download the best video and audio formats and merge them
|
169
|
+
command.extend([
|
170
|
+
"-f", "bv*+ba/b", # Download best video + best audio, or fallback to best combined format
|
171
|
+
"--merge-output-format", "mp4", # Merge into MP4
|
172
|
+
])
|
173
|
+
|
174
|
+
# Add the IQ.com URL
|
175
|
+
command.append(url)
|
176
|
+
|
177
|
+
# Execute the command
|
178
|
+
self._execute_command(command)
|
179
|
+
|
180
|
+
# Check if output file exists to confirm success
|
181
|
+
if os.path.isfile(output_file):
|
182
|
+
logger.info(f"Download from IQ.com completed successfully. Output saved to: {output_file}")
|
183
|
+
return output_file
|
184
|
+
else:
|
185
|
+
logger.error(f"Download from IQ.com failed. Output file not created: {output_file}")
|
186
|
+
return None
|
187
|
+
|
188
|
+
except Exception as e:
|
189
|
+
logger.error(Fore.RED + f"An unexpected error occurred: {e}" + Fore.RESET)
|
190
|
+
|
119
191
|
# =========================================================================================================== #
|
120
192
|
|
121
193
|
def re_encode_content(self, input_file, quality, codec="libx265", crf=23, preset="superfast", audio_bitrate="256k", fps=60):
|
@@ -252,6 +324,10 @@ class DOWNLOADER:
|
|
252
324
|
"--ignore-errors", # Ignore errors and continue downloading
|
253
325
|
]
|
254
326
|
|
327
|
+
# Add cookies if provided
|
328
|
+
if self.cookies:
|
329
|
+
command.extend(["--cookies", f"\"{self.cookies}\""])
|
330
|
+
|
255
331
|
# Add playlist-specific options if the URL is a playlist
|
256
332
|
if playlist:
|
257
333
|
command.extend([
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: DDownloader
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.2
|
4
4
|
Summary: A downloader for DRM-protected & Non DRM-protected content.
|
5
5
|
License: MIT License
|
6
6
|
|
@@ -23,6 +23,7 @@ License: MIT License
|
|
23
23
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
24
24
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
25
25
|
IN THE SOFTWARE.
|
26
|
+
License-File: LICENSE
|
26
27
|
Author: ThatNotEasy
|
27
28
|
Author-email: apidotmy@proton.me
|
28
29
|
Requires-Python: >=3.7
|
@@ -0,0 +1,20 @@
|
|
1
|
+
DDownloader/__init__.py,sha256=lVZwmZNId0Dai7XBQpxglmJtIxAtZplRHDsvobL2UNo,33
|
2
|
+
DDownloader/bin/aria2c.exe,sha256=viCZwhT2Ojy0lUsJoL7Nbi40ZguIbUyJjSYP6_6dcMI,5649408
|
3
|
+
DDownloader/bin/ffmpeg.exe,sha256=NqWbY4tJ-ObGIvTefEyKr4RC8wE4pYiC7irz9BDl_Vw,148103168
|
4
|
+
DDownloader/bin/mkvmerge.exe,sha256=s2WkBPBuhpWPNHKXwDBfQ4vOMXLYTfxu62PbnRqK55A,19144712
|
5
|
+
DDownloader/bin/mp4decrypt.exe,sha256=S_bzdPhiOvIULnxdTsWMgk98zhn4_KrD5EBBshXYEoY,366080
|
6
|
+
DDownloader/bin/N_m3u8DL-RE.exe,sha256=5ck6jeDFjFCSLBeoo7q9fSGT-0Oxp_rNCxjeknTvgGE,17197568
|
7
|
+
DDownloader/bin/shaka-packager.exe,sha256=GMkenPGAN7GhuM7Kc48IKcR2_jjiD3M6p-u6PP5Ddls,5366272
|
8
|
+
DDownloader/bin/yt-dlp.exe,sha256=TYiozhv_gpxxZ90h6LSo7rDbFEG8JzQPCJa754HJw8A,19557107
|
9
|
+
DDownloader/main.py,sha256=MQlFnNz5zwxHVwPucM7eqHhgSDG3N6fEsiMANxNlva4,7172
|
10
|
+
DDownloader/modules/__init__.py,sha256=Y-I6FXKes4hB39WcBm3HZ1OCtCWiErPB6YZ-YSgexuE,21
|
11
|
+
DDownloader/modules/args_parser.py,sha256=UjuGRs4paIUHGSOqbjC5RwEfe0ZfVRBCTU1IU0tgY4o,1307
|
12
|
+
DDownloader/modules/banners.py,sha256=ScEW8dm76eYVcYEP3m5BEDWeK2whsevULgbSOedYjag,5774
|
13
|
+
DDownloader/modules/downloader.py,sha256=x6QV09r9HlInnjN1K1fVFGr-Y3CkRh6yn5J_zFAYw4I,16357
|
14
|
+
DDownloader/modules/helper.py,sha256=-PMfT0pd3AsXY1K_WP1mER3dpw9gJ99Y-Erque_62nQ,8242
|
15
|
+
DDownloader/modules/streamlink.py,sha256=t7aaHCnINzSFybTmAd-dvfGFQkepFHJwrOBcNxyJviY,504
|
16
|
+
ddownloader-0.4.2.dist-info/entry_points.txt,sha256=36xFMHKWyVvFKBCCMd3ctyd6tyujf685-qilrMpsA1E,53
|
17
|
+
ddownloader-0.4.2.dist-info/licenses/LICENSE,sha256=cnjTim3BMjb9cVC_b3oS41FESKLuvuDsufVHa_ymZRw,1090
|
18
|
+
ddownloader-0.4.2.dist-info/METADATA,sha256=3gdeco4B2ZOI-gg-Ws8BVSLVy5PcD2sRYTAgv3NHtig,4928
|
19
|
+
ddownloader-0.4.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
20
|
+
ddownloader-0.4.2.dist-info/RECORD,,
|
@@ -1,20 +0,0 @@
|
|
1
|
-
DDownloader/__init__.py,sha256=lVZwmZNId0Dai7XBQpxglmJtIxAtZplRHDsvobL2UNo,33
|
2
|
-
DDownloader/bin/aria2c.exe,sha256=7NovO7hmaCdsPJK3Hue8N5mefFlAcJMjU_LnUnE9f6g,4840960
|
3
|
-
DDownloader/bin/ffmpeg.exe,sha256=NqWbY4tJ-ObGIvTefEyKr4RC8wE4pYiC7irz9BDl_Vw,148103168
|
4
|
-
DDownloader/bin/mkvmerge.exe,sha256=s2WkBPBuhpWPNHKXwDBfQ4vOMXLYTfxu62PbnRqK55A,19144712
|
5
|
-
DDownloader/bin/mp4decrypt.exe,sha256=JnI7mk4UduPVnUDg1aZBr4y_SWRFy8s-u_H6gG5xeOg,452096
|
6
|
-
DDownloader/bin/N_m3u8DL-RE.exe,sha256=5ck6jeDFjFCSLBeoo7q9fSGT-0Oxp_rNCxjeknTvgGE,17197568
|
7
|
-
DDownloader/bin/shaka-packager.exe,sha256=oQmfiToKeryylxsR9BiKuhXR_fS-PqPEu9W9rEsbrt8,5369344
|
8
|
-
DDownloader/bin/yt-dlp.exe,sha256=TYiozhv_gpxxZ90h6LSo7rDbFEG8JzQPCJa754HJw8A,19557107
|
9
|
-
DDownloader/main.py,sha256=eX0hrpBHKcpoqoyzKffnStU-3btaQK0VhcLCAYlL-Eg,6281
|
10
|
-
DDownloader/modules/__init__.py,sha256=1NSg4yHgqJJKYBklxFwmel_5eSNX51umiqsyFgx4770,21
|
11
|
-
DDownloader/modules/args_parser.py,sha256=Xc9ZzBu-QPFrBURIcq7rl8IJbrdPMy7EMWc-odVM2QU,1105
|
12
|
-
DDownloader/modules/banners.py,sha256=fK5JpztKeE4Se3p5-yB4jdUzsKZXsBSESoeGfbPzF84,5656
|
13
|
-
DDownloader/modules/downloader.py,sha256=D5k6GO5xb601D64W1ixlLd8C9D9hzpw_Ldm6yA5k1bs,13154
|
14
|
-
DDownloader/modules/helper.py,sha256=-PMfT0pd3AsXY1K_WP1mER3dpw9gJ99Y-Erque_62nQ,8242
|
15
|
-
DDownloader/modules/streamlink.py,sha256=t7aaHCnINzSFybTmAd-dvfGFQkepFHJwrOBcNxyJviY,504
|
16
|
-
ddownloader-0.4.0.dist-info/entry_points.txt,sha256=36xFMHKWyVvFKBCCMd3ctyd6tyujf685-qilrMpsA1E,53
|
17
|
-
ddownloader-0.4.0.dist-info/LICENSE,sha256=cnjTim3BMjb9cVC_b3oS41FESKLuvuDsufVHa_ymZRw,1090
|
18
|
-
ddownloader-0.4.0.dist-info/METADATA,sha256=yjYFF7BQku2Xu0y46eMsgME-ZdJNcosgwLVeJ-djoxI,4906
|
19
|
-
ddownloader-0.4.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
20
|
-
ddownloader-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|