Porównaj commity
1 Commity
Autor | SHA1 | Data |
---|---|---|
![]() |
fe61458946 |
56
README.md
56
README.md
|
@ -1,57 +1 @@
|
|||
# Netflix-videos-downloader
|
||||
|
||||
## 快速开始
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## 参数
|
||||
```
|
||||
基础参数:
|
||||
-h,--help 显示完整参数设置帮助文档并退出
|
||||
-q <数字> 视频分辨率,默认选择最高(1080),可选:480,720,1080等
|
||||
-o <目录路径>
|
||||
下载临时文件夹
|
||||
-f <目录路径>
|
||||
mkv混流输出文件夹,不指定默认输出到下载临时文件夹
|
||||
-s <数字> 季数(Season)不指定默认下载所有季
|
||||
-e <数字> 集数(Episode)不指定默认下载全集
|
||||
"-e 1" 下载第1集;
|
||||
"-e 1-7" 下载第1-7集;
|
||||
"-e 2,5" 下载第2集、第5集
|
||||
-p,--prompt
|
||||
下载前交互式提示输入yes/no
|
||||
--AD 语言代码,--alang 语言代码
|
||||
指定音轨语言,默认下载原始语言(Original)最高码率音轨
|
||||
语言代码位置:"/helpers/Muxer.py"
|
||||
--slang 语言代码
|
||||
指定字幕语言,默认下载所有语言字幕,
|
||||
例如"--slang zhoS zhoT" 即指定简体中文、繁体中文字幕
|
||||
--flang 语言代码
|
||||
指定“场景字幕”语言(Force Subtitle)
|
||||
--all-audios
|
||||
下载所有语言音轨
|
||||
--all-forced
|
||||
下载所有语言“场景字幕”
|
||||
--audio-bitrate <数字>
|
||||
指定音频码率,默认下载最高码率音轨,可选:128,256,448等
|
||||
--aformat-2c,--audio-format-2ch
|
||||
指定下载2.0声道音轨
|
||||
--aformat-51ch,--audio-format-51ch
|
||||
指定下载5.1声道音轨
|
||||
--keep 混流mkv后保留原始素材文件,默认删除
|
||||
-keys,--license
|
||||
仅输出widevine key到控制台并退出
|
||||
--no-aria2c 不调用aria2c下载器,使用Python下载器,默认使用aria2c
|
||||
不推荐使用此参数
|
||||
--nv 不下载视频(Video)
|
||||
--na 不下载音频(Audio)
|
||||
--ns 不下载字幕(Subtitle)
|
||||
|
||||
额外配置文件参数(Manifest):
|
||||
--main 指定 H.264 Main
|
||||
--high 指定 H.264 High
|
||||
--hevc 指定 H.265
|
||||
--hdr 指定 H.265 HDR
|
||||
--check 比较H.264 Main/H.264 High二者质量优劣
|
||||
```
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -34,11 +34,11 @@ MUXER = {
|
|||
"DEFAULT": False, # to use the normal renaming. EX: Stranger Things S01E01 [1080p].mkv
|
||||
"AUDIO": "hin", # default audio language.
|
||||
"SUB": "None", # default subtitle language. EX: "eng" or "spa"
|
||||
"GROUP": "TJUPT", # to change the group name!. it's also possible to use this "--gr LOL", on the ripping commands.
|
||||
"noTitle": True, # this will remove titles from the episodes EX: (The Witcher S01E01). insstead of (The Witcher S01E01 The End's Beginning).
|
||||
"GROUP": "Tandav", # to change the group name!. it's also possible to use this "--gr LOL", on the ripping commands.
|
||||
"noTitle": False, # this will remove titles from the episodes EX: (The Witcher S01E01). insstead of (The Witcher S01E01 The End's Beginning).
|
||||
"scheme": "p2p", # add/change any needed scheme naming. it's also possible to use this "--muxscheme repack", on the ripping commands.
|
||||
"schemeslist": {
|
||||
"p2p": "{t}.{r}.{s}.WEB-DL.{vc}.{ac}-{gr}",
|
||||
"p2p": "{t}.{r}.{s}.WEB-DL.{ac}.{vc}-{gr}",
|
||||
"test": "{t}.{r}.{s}.WEB-DL-{gr}",
|
||||
},
|
||||
"EXTRAS": [], # extra mkvmerge.exe commands.
|
||||
|
@ -48,7 +48,7 @@ MUXER = {
|
|||
#####################################(PATHS)#####################################
|
||||
|
||||
PATHS = {
|
||||
"DL_FOLDER": f"{dirPath}", #
|
||||
"DL_FOLDER": "E:/#rips", #
|
||||
"DIR_PATH": f"{dirPath}",
|
||||
"BINARY_PATH": f"{dirPath}/bin",
|
||||
"COOKIES_PATH": f"{dirPath}/configs/Cookies",
|
||||
|
@ -60,19 +60,6 @@ PATHS = {
|
|||
|
||||
ARIA2C = {
|
||||
"enable_logging": False, # True
|
||||
"enable_pass_config_to_aria2c": True, #传递aria2c参数
|
||||
"file_allocation": "none", # 文件预分配方式:机械硬盘 falloc,固态硬盘 none
|
||||
"http_proxy_aria2c": "http://127.0.0.1:7890", # 代理地址,根据需要修改
|
||||
"https_proxy_aria2c": "http://127.0.0.1:7890",
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
|
||||
"connection": "64", # 单服务器最大连接线程数
|
||||
"split": "64", # 单任务最大连接线程数
|
||||
"summary_interval": "0", # 下载进度摘要输出间隔时间
|
||||
"continue_aria2c": "true", # 断点续传
|
||||
"max_tries": "0", # 最大尝试次数,0 表示无限
|
||||
"piece_length": "1M", # HTTP/FTP下载分片大小
|
||||
"min_split_size": "4M", # 文件最小分段大小,理论上值越小下载速度越快
|
||||
"disk_cache": "64M", # 磁盘缓存,提升读写性能,有足够内存情况下增加
|
||||
}
|
||||
|
||||
SETTINGS = {
|
||||
|
@ -80,7 +67,7 @@ SETTINGS = {
|
|||
}
|
||||
|
||||
#####################################(VPN)#####################################
|
||||
# 不要修改这部分
|
||||
|
||||
VPN = {
|
||||
"proxies": None, # "http://151.253.165.70:8080",
|
||||
"nordvpn": {
|
||||
|
@ -91,7 +78,7 @@ VPN = {
|
|||
},
|
||||
"private": {
|
||||
"port": "8080",
|
||||
"email": "xxx",
|
||||
"email": "abdalhmohmd8@gmail.com",
|
||||
"passwd": "123456",
|
||||
"http": "http://{email}:{passwd}@{ip}:{port}",
|
||||
},
|
||||
|
@ -118,8 +105,8 @@ Config["NETFLIX"] = {
|
|||
"cookies_txt": f"{dirPath}/configs/Cookies/cookies.txt",
|
||||
"keys_file": f"{dirPath}/configs/KEYS/netflix.keys",
|
||||
"token_file": f"{dirPath}/configs/Tokens/netflix_token.json",
|
||||
"email": "xxxxxx@gmail.com",
|
||||
"password": "123123",
|
||||
"email": "Cfklop@max07.club",
|
||||
"password": "1111",
|
||||
"manifest_language": "en-US",
|
||||
"metada_language": "en",
|
||||
"manifestEsn": "NFCDIE-03-{}".format(utils().random_hex(30)),
|
||||
|
|
|
@ -318,15 +318,10 @@ class Muxer(object):
|
|||
|
||||
def LanguageList(self):
|
||||
LanguageList = [
|
||||
["Simplified Chinese", "zhoS", "chi", "Simplified Chinese"],
|
||||
["Traditional Chinese", "zhoT", "chi", "Traditional Chinese"],
|
||||
["Mandarin (Putonghua)", "zho", "zh-cmn", "Mandarin"],
|
||||
["Mandarin (Guoyu)", "zho", "chi", "Chinese"],
|
||||
["Cantonese", "zho", "zh-yue", "Cantonese"],
|
||||
["Taiwanese", "zho", "zh-nan", "Minnan"],
|
||||
["Chinese", "zho", "chi", "Chinese"],
|
||||
["Hindi", "hin", "hin", "Hindi"],
|
||||
["Tamil", "tam", "tam", "Tamil"],
|
||||
["Telugu", "tel", "tel", "Telugu"],
|
||||
["English", "eng", "eng", "English"],
|
||||
["British English", "enGB", "eng", "British English"],
|
||||
["Afrikaans", "af", "afr", "Afrikaans"],
|
||||
["Arabic", "ara", "ara", "Arabic"],
|
||||
["Arabic (Syria)", "araSy", "ara", "Arabic Syria"],
|
||||
|
@ -353,15 +348,16 @@ class Muxer(object):
|
|||
["Assamese", "asm", "asm", "Assamese"],
|
||||
["Bengali", "ben", "ben", "Bengali"],
|
||||
["Basque", "eus", "baq", "Basque"],
|
||||
["British English", "enGB", "eng", "British English"],
|
||||
["Bulgarian", "bul", "bul", "Bulgarian"],
|
||||
["Cantonese", "None", "chi", "Cantonese"],
|
||||
["Catalan", "cat", "cat", "Catalan"],
|
||||
["Simplified Chinese", "zhoS", "chi", "Chinese Simplified"],
|
||||
["Traditional Chinese", "zhoT", "chi", "Chinese Traditional"],
|
||||
["Croatian", "hrv", "hrv", "Croatian"],
|
||||
["Czech", "ces", "cze", "Czech"],
|
||||
["Danish", "dan", "dan", "Danish"],
|
||||
["Dutch", "nld", "dut", "Dutch"],
|
||||
["Hindi", "hin", "hin", "Hindi"],
|
||||
["Tamil", "tam", "tam", "Tamil"],
|
||||
["Telugu", "tel", "tel", "Telugu"],
|
||||
["Estonian", "est", "est", "Estonian"],
|
||||
["Filipino", "fil", "fil", "Filipino"],
|
||||
["Finnish", "fin", "fin", "Finnish"],
|
||||
|
@ -500,6 +496,8 @@ class Muxer(object):
|
|||
self.mkvmerge,
|
||||
"--output",
|
||||
outputVideo,
|
||||
"--title",
|
||||
'RAB',
|
||||
"(",
|
||||
inputVideo,
|
||||
")",
|
||||
|
@ -587,7 +585,7 @@ class Muxer(object):
|
|||
"--language",
|
||||
f"0:{language_id}",
|
||||
"--track-name",
|
||||
f"0:{language_name} Forced",
|
||||
f"0:Forced",
|
||||
"--forced-track",
|
||||
"0:yes",
|
||||
"--default-track",
|
||||
|
@ -606,7 +604,7 @@ class Muxer(object):
|
|||
"--language",
|
||||
f"0:{language_id}",
|
||||
"--track-name",
|
||||
f"0:{language_name} SDH",
|
||||
f"0:SDH",
|
||||
"--forced-track",
|
||||
"0:no",
|
||||
"--default-track",
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -52,7 +52,7 @@ def __profiles(profile, addHEVCDO=False):
|
|||
|
||||
elif profile == "Main KEYS":
|
||||
profiles += [
|
||||
"playready-h264bpl30-dash",
|
||||
"playready-h264mpl30-dash",
|
||||
]
|
||||
|
||||
elif profile == "HEVC KEYS":
|
||||
|
@ -60,15 +60,15 @@ def __profiles(profile, addHEVCDO=False):
|
|||
"hevc-main-L30-dash-cenc",
|
||||
"hevc-main10-L30-dash-cenc",
|
||||
"hevc-main10-L30-dash-cenc-prk",
|
||||
"hevc-main-L31-dash-cenc",
|
||||
"hevc-main-L31-dash-cenc"
|
||||
"hevc-main10-L31-dash-cenc",
|
||||
"hevc-main10-L31-dash-cenc-prk",
|
||||
"hevc-main-L40-dash-cenc",
|
||||
"hevc-main-L40-dash-cenc",
|
||||
"hevc-main10-L40-dash-cenc",
|
||||
"hevc-main10-L40-dash-cenc-prk",
|
||||
"hevc-main-L41-dash-cenc",
|
||||
"hevc-main10-L40-dash-cenc-prk",
|
||||
"hevc-main-L41-dash-cenc",
|
||||
"hevc-main10-L41-dash-cenc",
|
||||
"hevc-main10-L41-dash-cenc-prk",
|
||||
"hevc-main10-L41-dash-cenc-prk"
|
||||
]
|
||||
if addHEVCDO:
|
||||
profiles += [
|
||||
|
@ -80,16 +80,18 @@ def __profiles(profile, addHEVCDO=False):
|
|||
|
||||
elif profile == 'HDR-10 KEYS':
|
||||
profiles += [
|
||||
'hevc-hdr-main10-L30-dash-cenc',
|
||||
'hevc-hdr-main10-L30-dash-cenc-prk',
|
||||
'hevc-hdr-main10-L31-dash-cenc',
|
||||
'hevc-hdr-main10-L31-dash-cenc-prk',
|
||||
'hevc-hdr-main10-L40-dash-cenc',
|
||||
'hevc-hdr-main10-L40-dash-cenc-prk',
|
||||
"hevc-hdr-main10-L30-dash-cenc",
|
||||
"hevc-hdr-main10-L30-dash-cenc-prk",
|
||||
"hevc-hdr-main10-L31-dash-cenc",
|
||||
"hevc-hdr-main10-L31-dash-cenc-prk",
|
||||
"hevc-hdr-main10-L40-dash-cenc",
|
||||
"hevc-hdr-main10-L41-dash-cenc",
|
||||
"hevc-hdr-main10-L40-dash-cenc-prk",
|
||||
"hevc-hdr-main10-L41-dash-cenc-prk"
|
||||
]
|
||||
else:
|
||||
profiles += [
|
||||
"playready-h264mpl30-dash",
|
||||
"playready-h264bpl30-dash",
|
||||
]
|
||||
|
||||
return profiles
|
||||
|
|
|
@ -19,12 +19,14 @@ def MSLprofiles():
|
|||
"playready-h264mpl31-dash",
|
||||
],
|
||||
"FHD": [
|
||||
"playready-h264bpl30-dash",
|
||||
"playready-h264mpl22-dash",
|
||||
"playready-h264mpl30-dash",
|
||||
"playready-h264mpl31-dash",
|
||||
"playready-h264mpl40-dash",
|
||||
],
|
||||
"ALL": [
|
||||
"playready-h264bpl30-dash",
|
||||
"playready-h264mpl22-dash",
|
||||
"playready-h264mpl30-dash",
|
||||
"playready-h264mpl31-dash",
|
||||
|
@ -332,7 +334,7 @@ class get_manifest:
|
|||
else f"{size_in_bytes/1073741824:0.2f} GiB"
|
||||
)
|
||||
vid_url = downloadable["urls"][0]["url"]
|
||||
L3 = 'L3' if 'SEGMENT_MAP_2KEY' in str(downloadable['tags']) else ''
|
||||
L3 = 'L3' if 'SEGMENT_MAP_2KEY' in str(downloadable['tags']) else '' #
|
||||
|
||||
VideoList.append(
|
||||
{
|
||||
|
@ -346,7 +348,7 @@ class get_manifest:
|
|||
"Url": vid_url,
|
||||
"Bitrate": str(downloadable["bitrate"]),
|
||||
"Profile": downloadable["content_profile"],
|
||||
"L3": L3
|
||||
"L3": L3 #
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -364,7 +366,6 @@ class get_manifest:
|
|||
return VideoList
|
||||
|
||||
def ParseVideo(self, resp, getHigh):
|
||||
|
||||
manifest = resp["result"]
|
||||
VideoList = []
|
||||
checkerinfo = ""
|
||||
|
@ -408,46 +409,24 @@ class get_manifest:
|
|||
|
||||
if getHigh:
|
||||
HighVideoList = self.HighVideoMSL()
|
||||
# 变量赋值
|
||||
if not HighVideoList == []:
|
||||
main_max = dict(VideoList[-1])
|
||||
high_max = dict(HighVideoList[-1])
|
||||
else:
|
||||
self.logger.info("Error: Getting Manifest")
|
||||
exit(-1)
|
||||
# 判断 main 或 high,要求:
|
||||
# main 和 high 的 vmaf 不同时选择 vmaf 更高者
|
||||
# main 和 high 的 vmaf 相同时选择 bitrate 更高者
|
||||
if main_max["vmaf"]:
|
||||
if int(main_max["vmaf"]) >= int(high_max["vmaf"]) and int(main_max["Bitrate"]) >= int(high_max["Bitrate"]):
|
||||
check_high_or_main = "MAIN"
|
||||
else:
|
||||
check_high_or_main = "HIGH"
|
||||
# vmaf = None 时,通过码率判断
|
||||
elif main_max["Bitrate"]:
|
||||
if int(main_max["Bitrate"]) >= int(high_max["Bitrate"]):
|
||||
check_high_or_main = "MAIN"
|
||||
else:
|
||||
check_high_or_main = "HIGH"
|
||||
else:
|
||||
self.logger.info("Error: Getting Manifest")
|
||||
exit(-1)
|
||||
|
||||
checkerinfo = "\nNetflix Profile Checker v1.1\n2021-11-07 Jared_mod\n\nMain Profile Rate: {}kbps | VMAF: {} | {}\nHigh Profile Rate: {}kbps | VMAF: {} | {}\nResult: {} is Better!\n".format(
|
||||
str(main_max["Bitrate"]),
|
||||
str(main_max["vmaf"]),
|
||||
str(main_max["Profile"]),
|
||||
str(high_max["Bitrate"]),
|
||||
str(high_max["vmaf"]),
|
||||
str(high_max["Profile"]),
|
||||
check_high_or_main,
|
||||
checkerinfo = "\nNetflix Profile Checker v1.0\nMAIN: {}kbps | {}\nHIGH: {}kbps | {}\n\n{}\n"
|
||||
checkerinfo = checkerinfo.format(
|
||||
str(dict(VideoList[-1])["Bitrate"]),
|
||||
str(dict(VideoList[-1])["Profile"]),
|
||||
str(dict(HighVideoList[-1])["Bitrate"]),
|
||||
str(dict(HighVideoList[-1])["Profile"]),
|
||||
"result: MAIN is Better"
|
||||
if int(dict(VideoList[-1])["Bitrate"])
|
||||
>= int(dict(HighVideoList[-1])["Bitrate"])
|
||||
else "result: HIGH is Better",
|
||||
)
|
||||
self.logger.debug("HighVideoList: {}".format(HighVideoList))
|
||||
|
||||
if check_high_or_main == "HIGH":
|
||||
VideoList = HighVideoList
|
||||
VideoList += HighVideoList
|
||||
self.logger.debug("HighVideoList: {}".format(HighVideoList))
|
||||
|
||||
VideoList = sorted(VideoList, key=lambda k: int(k["Bitrate"]))
|
||||
|
||||
return VideoList, checkerinfo
|
||||
|
||||
def ParseAudioSubs(self, resp):
|
||||
|
|
|
@ -163,120 +163,67 @@ class aria2:
|
|||
def aria2Options(
|
||||
self,
|
||||
allow_overwrite=True,
|
||||
file_allocation=None,
|
||||
auto_file_renaming=False,
|
||||
async_dns=False,
|
||||
retry_wait=5,
|
||||
enable_color=True,
|
||||
concurrent_downloads=5,
|
||||
summary_interval=0,
|
||||
enable_color=False,
|
||||
connection=16,
|
||||
concurrent_downloads=16,
|
||||
split=16,
|
||||
header="skip",
|
||||
user_agent="",
|
||||
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
|
||||
uri_selector="inorder",
|
||||
console_log_level="skip",
|
||||
download_result="hide",
|
||||
quiet="false",
|
||||
extra_commands=[],
|
||||
|
||||
# Jared_mod settings
|
||||
connection=64,
|
||||
split=64,
|
||||
http_proxy_aria2c="",
|
||||
https_proxy_aria2c="",
|
||||
save_session_interval=1,
|
||||
auto_save_interval=30,
|
||||
force_save="false",
|
||||
min_split_size="4M",
|
||||
max_tries="0",
|
||||
piece_length="1M",
|
||||
summary_interval=0,
|
||||
continue_aria2c="true",
|
||||
file_allocation="none",
|
||||
disk_cache="64M",
|
||||
):
|
||||
|
||||
if self.config["enable_pass_config_to_aria2c"]:
|
||||
file_allocation = self.config["file_allocation"]
|
||||
http_proxy_aria2c = self.config["http_proxy_aria2c"]
|
||||
https_proxy_aria2c = self.config["https_proxy_aria2c"]
|
||||
user_agent = self.config["user_agent"]
|
||||
connection = self.config["connection"]
|
||||
split = self.config["split"]
|
||||
summary_interval = self.config["summary_interval"]
|
||||
continue_aria2c = self.config["continue_aria2c"]
|
||||
max_tries = self.config["max_tries"]
|
||||
piece_length = self.config["piece_length"]
|
||||
min_split_size = self.config["min_split_size"]
|
||||
disk_cache = self.config["disk_cache"]
|
||||
else: pass
|
||||
|
||||
options = [] + extra_commands
|
||||
allow_overwrite = self.convert_args(allow_overwrite)
|
||||
quiet = self.convert_args(quiet)
|
||||
file_allocation = self.convert_args(file_allocation)
|
||||
auto_file_renaming = self.convert_args(auto_file_renaming)
|
||||
async_dns = self.convert_args(async_dns)
|
||||
retry_wait = self.convert_args(retry_wait)
|
||||
enable_color = self.convert_args(enable_color)
|
||||
connection = self.convert_args(connection)
|
||||
concurrent_downloads = self.convert_args(concurrent_downloads)
|
||||
split = self.convert_args(split)
|
||||
header = self.convert_args(header)
|
||||
user_agent = self.convert_args(user_agent)
|
||||
uri_selector = self.convert_args(uri_selector)
|
||||
console_log_level = self.convert_args(console_log_level)
|
||||
download_result = self.convert_args(download_result)
|
||||
|
||||
connection = self.convert_args(connection)
|
||||
split = self.convert_args(split)
|
||||
http_proxy_aria2c = self.convert_args(http_proxy_aria2c)
|
||||
https_proxy_aria2c = self.convert_args(https_proxy_aria2c)
|
||||
save_session_interval = self.convert_args(save_session_interval)
|
||||
auto_save_interval = self.convert_args(auto_save_interval)
|
||||
force_save = self.convert_args(force_save)
|
||||
min_split_size = self.convert_args(min_split_size)
|
||||
max_tries = self.convert_args(max_tries)
|
||||
piece_length = self.convert_args(piece_length)
|
||||
summary_interval = self.convert_args(summary_interval)
|
||||
continue_aria2c = self.convert_args(continue_aria2c)
|
||||
file_allocation = self.convert_args(file_allocation)
|
||||
disk_cache = self.convert_args(disk_cache)
|
||||
|
||||
##############################################################################
|
||||
|
||||
options += self.append_commands(options, "--allow-overwrite=", allow_overwrite)
|
||||
options += self.append_commands(options, "--quiet=", quiet)
|
||||
|
||||
options += self.append_commands(options, "--file-allocation=", file_allocation)
|
||||
options += self.append_commands(
|
||||
options, "--auto-file-renaming=", auto_file_renaming
|
||||
)
|
||||
options += self.append_commands(options, "--async-dns=", async_dns)
|
||||
options += self.append_commands(options, "--retry-wait=", retry_wait)
|
||||
options += self.append_commands(options, "--enable-color=", enable_color)
|
||||
|
||||
options += self.append_commands(
|
||||
options, "--max-connection-per-server=", connection
|
||||
)
|
||||
|
||||
options += self.append_commands(
|
||||
options, "--max-concurrent-downloads=", concurrent_downloads
|
||||
)
|
||||
|
||||
options += self.append_commands(options, "--split=", split)
|
||||
options += self.append_commands(options, "--header=", header)
|
||||
options += self.append_commands(options, "--user-agent=", user_agent)
|
||||
options += self.append_commands(options, "--uri-selector=", uri_selector)
|
||||
options += self.append_commands(
|
||||
options, "--console-log-level=", console_log_level
|
||||
)
|
||||
options += self.append_commands(options, "--download-result=", download_result)
|
||||
|
||||
options += self.append_commands(
|
||||
options, "--max-connection-per-server=", connection
|
||||
)
|
||||
options += self.append_commands(options, "--split=", split)
|
||||
options += self.append_commands(options, "--http-proxy=", http_proxy_aria2c)
|
||||
options += self.append_commands(options, "--https-proxy=", https_proxy_aria2c)
|
||||
options += self.append_commands(options, "--save-session-interval=", save_session_interval)
|
||||
options += self.append_commands(options, "--auto-save-interval=", auto_save_interval)
|
||||
options += self.append_commands(options, "--force-save=", force_save)
|
||||
options += self.append_commands(options, "--min-split-size=", min_split_size)
|
||||
options += self.append_commands(options, "--max-tries=", max_tries)
|
||||
options += self.append_commands(options, "--piece-length=", piece_length)
|
||||
options += self.append_commands(options, "--summary-interval=", summary_interval)
|
||||
options += self.append_commands(options, "--continue=", continue_aria2c)
|
||||
options += self.append_commands(options, "--file-allocation=", file_allocation)
|
||||
options += self.append_commands(options, "--disk-cache=", disk_cache)
|
||||
|
||||
return options
|
||||
|
||||
def aria2DisableProxies(self):
|
||||
|
|
|
@ -386,10 +386,6 @@ class ripprocess(object):
|
|||
return "Mandarin Chinese (Simplified)", "zh-Hans"
|
||||
elif code == "cmn-Hant":
|
||||
return "Mandarin Chinese (Traditional)", "zh-Hant"
|
||||
elif code == "zh-TW":
|
||||
return "Chinese", "zho"
|
||||
elif code == "zh-CN":
|
||||
return "Chinese", "zho"
|
||||
elif code == "es-419":
|
||||
return "Spanish", "spa"
|
||||
elif code == "es-ES":
|
||||
|
@ -678,18 +674,16 @@ class ripprocess(object):
|
|||
|
||||
outputName = inputName.replace(replace_str, ext)
|
||||
self.logger.info(("{} -> {}").format(inputName, outputName))
|
||||
#直接重命名到目标格式,移除ffmpeg混流过程
|
||||
os.rename(inputName, outputName)
|
||||
#ff = ffmpy.FFmpeg(
|
||||
# executable=self.bin["ffmpeg"],
|
||||
# inputs={inputName: None},
|
||||
# outputs={outputName: "-c:a copy"},
|
||||
# global_options="-vn -sn -y -hide_banner -loglevel panic",
|
||||
#)
|
||||
#ff.run()
|
||||
#time.sleep(0.05)
|
||||
#if os.path.isfile(outputName) and os.path.getsize(outputName) > 1024 * 1024:
|
||||
# os.remove(inputName)
|
||||
ff = ffmpy.FFmpeg(
|
||||
executable=self.bin["ffmpeg"],
|
||||
inputs={inputName: None},
|
||||
outputs={outputName: "-c:a copy"},
|
||||
global_options="-vn -sn -y -hide_banner -loglevel panic",
|
||||
)
|
||||
ff.run()
|
||||
time.sleep(0.05)
|
||||
if os.path.isfile(outputName) and os.path.getsize(outputName) > 1024 * 1024:
|
||||
os.remove(inputName)
|
||||
self.logger.info("Done!")
|
||||
|
||||
return
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"token": "token.bin",
|
||||
"client_info":
|
||||
{
|
||||
"company_name": "Google",
|
||||
"model_name": "Spacecastgfsc100",
|
||||
"architecture_name": "armeabi-v7a",
|
||||
"device_name": "Spacecastgfsc100",
|
||||
"product_name": "Spacecastgfsc100",
|
||||
"build_info": "boundary/nitrogen6x/nitrogen6x:6.0.1/1.0.0-ga/20160530:eng/release-keys",
|
||||
"device_id": "R29vZ2xlU3BhY2VjYXN0Z2ZzYzEwMDAwMDAwMDAxAAA=",
|
||||
"os_version": "8.0.12"
|
||||
},
|
||||
"capabilities":
|
||||
{
|
||||
"session_token": 1,
|
||||
"max_hdcp_version": "HDCP_V1",
|
||||
"oem_crypto_api_version": 9
|
||||
}
|
||||
}
|
Plik binarny nie jest wyświetlany.
|
@ -1,25 +0,0 @@
|
|||
bs4
|
||||
colorama
|
||||
wcwidth
|
||||
requests
|
||||
ffmpy
|
||||
inquirer
|
||||
pycountry
|
||||
tqdm
|
||||
future
|
||||
cssutils
|
||||
pycaption
|
||||
pymediainfo
|
||||
isodate
|
||||
untangle
|
||||
tldextract
|
||||
unidecode
|
||||
yarl
|
||||
natsort
|
||||
titlecase
|
||||
prettytable
|
||||
termcolor
|
||||
pproxy
|
||||
pysrt
|
||||
protobuf
|
||||
pycryptodomex
|
Plik binarny nie jest wyświetlany.
|
@ -299,11 +299,8 @@ class netflix:
|
|||
|
||||
def downloadFile2(self, url, file_name):
|
||||
with open(file_name, "wb") as f:
|
||||
# 避免ssl错误卡死,关闭requests模块ssl证书验证:verify=False
|
||||
# 关闭后,控制台持续输出警告,建议开启证书验证,取消注释下行代码可以屏蔽
|
||||
# requests.packages.urllib3.disable_warnings()
|
||||
response = requests.get(url, stream=True, verify=False)
|
||||
# response.encoding = 'UTF-8'
|
||||
response = requests.get(url, stream=True)
|
||||
#response.encoding = 'UTF-8'
|
||||
f.write(response.content)
|
||||
|
||||
return
|
||||
|
@ -322,6 +319,11 @@ class netflix:
|
|||
auto_file_renaming=False,
|
||||
async_dns="skip",
|
||||
retry_wait=5,
|
||||
summary_interval=0,
|
||||
enable_color=True,
|
||||
connection=16,
|
||||
concurrent_downloads=16,
|
||||
split=16,
|
||||
uri_selector="inorder",
|
||||
console_log_level="warn",
|
||||
download_result="hide",
|
||||
|
@ -387,19 +389,17 @@ class netflix:
|
|||
return "DDP5.1"
|
||||
|
||||
def RemuxVideo(self, outputVideoTemp, outputVideo, Name):
|
||||
#self.logger.info("\nRemuxing video...")
|
||||
#ff = ffmpy.FFmpeg(
|
||||
# executable=self.bin["ffmpeg"],
|
||||
# inputs={outputVideoTemp: None},
|
||||
# outputs={outputVideo: "-c copy"},
|
||||
# global_options="-y -hide_banner -loglevel warning",
|
||||
#)
|
||||
#ff.run()
|
||||
#time.sleep(50.0 / 1000.0)
|
||||
#os.remove(outputVideoTemp)
|
||||
|
||||
#解密视频文件直接重命名,移除ffmpeg混流过程
|
||||
os.rename(outputVideoTemp, outputVideo)
|
||||
self.logger.info("\nRemuxing video...")
|
||||
ff = ffmpy.FFmpeg(
|
||||
executable=self.bin["ffmpeg"],
|
||||
inputs={outputVideoTemp: None},
|
||||
outputs={outputVideo: "-c copy"},
|
||||
global_options="-y -hide_banner -loglevel warning",
|
||||
)
|
||||
|
||||
ff.run()
|
||||
time.sleep(50.0 / 1000.0)
|
||||
os.remove(outputVideoTemp)
|
||||
self.logger.info("Done!")
|
||||
return True
|
||||
|
||||
|
@ -461,7 +461,6 @@ class netflix:
|
|||
if not only1key == []:
|
||||
KEYS = only1key
|
||||
|
||||
# 未解密视频传递ripprocess模块解密
|
||||
self.ripprocess.mp4_decrypt(
|
||||
encrypted=inputVideo,
|
||||
decrypted=outputVideoTemp,
|
||||
|
@ -471,21 +470,18 @@ class netflix:
|
|||
silent=silent,
|
||||
)
|
||||
|
||||
#不理解这个模块的判断逻辑,操作是把解密的视频,传入ffmpeg重新封装
|
||||
#if not "NETFLIX".lower() in list(
|
||||
# map(lambda x: x.lower(), self.video_settings["skip_video_demux"])
|
||||
#):
|
||||
# self.ripprocess.DemuxVideo(
|
||||
# outputVideoTemp=outputVideoTemp,
|
||||
# outputVideo=outputVideo,
|
||||
# ffmpeg=True,
|
||||
# mp4box=False,
|
||||
# )
|
||||
#else:
|
||||
# os.rename(outputVideoTemp, outputVideo)
|
||||
|
||||
#移除判断,解密后视频文件直接重命名
|
||||
os.rename(outputVideoTemp, outputVideo)
|
||||
if not "NETFLIX".lower() in list(
|
||||
map(lambda x: x.lower(), self.video_settings["skip_video_demux"])
|
||||
):
|
||||
self.ripprocess.DemuxVideo(
|
||||
outputVideoTemp=outputVideoTemp,
|
||||
outputVideo=outputVideo,
|
||||
ffmpeg=True,
|
||||
mp4box=False,
|
||||
)
|
||||
else:
|
||||
os.rename(outputVideoTemp, outputVideo)
|
||||
|
||||
return True
|
||||
|
||||
def SubtitleThreader(self, subtitlesList, name):
|
||||
|
|
Ładowanie…
Reference in New Issue