Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
XianxinMao
Yt Dlp
提交
40fcba5e
Y
Yt Dlp
项目概览
XianxinMao
/
Yt Dlp
12 个月 前同步成功
通知
27
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
Yt Dlp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
40fcba5e
编写于
4月 12, 2017
作者:
R
Remita Amine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve coding style
上级
e4d74e27
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
12 addition
and
12 deletion
+12
-12
youtube_dl/YoutubeDL.py
youtube_dl/YoutubeDL.py
+1
-1
youtube_dl/compat.py
youtube_dl/compat.py
+1
-1
youtube_dl/downloader/rtmp.py
youtube_dl/downloader/rtmp.py
+1
-1
youtube_dl/extractor/bbc.py
youtube_dl/extractor/bbc.py
+2
-2
youtube_dl/extractor/common.py
youtube_dl/extractor/common.py
+1
-1
youtube_dl/extractor/rudo.py
youtube_dl/extractor/rudo.py
+1
-1
youtube_dl/extractor/viewlift.py
youtube_dl/extractor/viewlift.py
+1
-1
youtube_dl/extractor/vlive.py
youtube_dl/extractor/vlive.py
+2
-2
youtube_dl/postprocessor/ffmpeg.py
youtube_dl/postprocessor/ffmpeg.py
+1
-1
youtube_dl/postprocessor/metadatafromtitle.py
youtube_dl/postprocessor/metadatafromtitle.py
+1
-1
未找到文件。
youtube_dl/YoutubeDL.py
浏览文件 @
40fcba5e
...
...
@@ -855,7 +855,7 @@ def process_ie_result(self, ie_result, download=True, extra_info={}):
return
self
.
process_ie_result
(
new_result
,
download
=
download
,
extra_info
=
extra_info
)
elif
result_type
==
'playlist'
or
result_type
==
'multi_video'
:
elif
result_type
in
(
'playlist'
,
'multi_video'
)
:
# We process each entry in the playlist
playlist
=
ie_result
.
get
(
'title'
)
or
ie_result
.
get
(
'id'
)
self
.
to_screen
(
'[download] Downloading playlist: %s'
%
playlist
)
...
...
youtube_dl/compat.py
浏览文件 @
40fcba5e
...
...
@@ -2692,7 +2692,7 @@ def compat_expanduser(path):
userhome
=
pwent
.
pw_dir
userhome
=
userhome
.
rstrip
(
'/'
)
return
(
userhome
+
path
[
i
:])
or
'/'
elif
compat_os_name
==
'nt'
or
compat_os_name
==
'ce'
:
elif
compat_os_name
in
(
'nt'
,
'ce'
)
:
def
compat_expanduser
(
path
):
"""Expand ~ and ~user constructs.
...
...
youtube_dl/downloader/rtmp.py
浏览文件 @
40fcba5e
...
...
@@ -169,7 +169,7 @@ def run_rtmpdump(args):
self
.
report_error
(
'[rtmpdump] Could not connect to RTMP server.'
)
return
False
while
(
retval
==
RD_INCOMPLETE
or
retval
==
RD_FAILED
)
and
not
test
and
not
live
:
while
retval
in
(
RD_INCOMPLETE
,
RD_FAILED
)
and
not
test
and
not
live
:
prevsize
=
os
.
path
.
getsize
(
encodeFilename
(
tmpfilename
))
self
.
to_screen
(
'[rtmpdump] %s bytes'
%
prevsize
)
time
.
sleep
(
5.0
)
# This seems to be needed
...
...
youtube_dl/extractor/bbc.py
浏览文件 @
40fcba5e
...
...
@@ -409,7 +409,7 @@ def _download_playlist(self, playlist_id):
description
=
smp_config
[
'summary'
]
for
item
in
smp_config
[
'items'
]:
kind
=
item
[
'kind'
]
if
kind
!=
'programme'
and
kind
!=
'radioProgramme'
:
if
kind
not
in
(
'programme'
,
'radioProgramme'
)
:
continue
programme_id
=
item
.
get
(
'vpid'
)
duration
=
int_or_none
(
item
.
get
(
'duration'
))
...
...
@@ -450,7 +450,7 @@ def _extract_from_legacy_playlist(self, playlist, playlist_id):
for
item
in
self
.
_extract_items
(
playlist
):
kind
=
item
.
get
(
'kind'
)
if
kind
!=
'programme'
and
kind
!=
'radioProgramme'
:
if
kind
not
in
(
'programme'
,
'radioProgramme'
)
:
continue
title
=
playlist
.
find
(
'./{%s}title'
%
self
.
_EMP_PLAYLIST_NS
).
text
description_el
=
playlist
.
find
(
'./{%s}summary'
%
self
.
_EMP_PLAYLIST_NS
)
...
...
youtube_dl/extractor/common.py
浏览文件 @
40fcba5e
...
...
@@ -1779,7 +1779,7 @@ def extract_Initialization(source):
if
content_type
==
'text'
:
# TODO implement WebVTT downloading
pass
elif
content_type
==
'video'
or
content_type
==
'audio'
:
elif
content_type
in
(
'video'
,
'audio'
)
:
base_url
=
''
for
element
in
(
representation
,
adaptation_set
,
period
,
mpd_doc
):
base_url_e
=
element
.
find
(
_add_ns
(
'BaseURL'
))
...
...
youtube_dl/extractor/rudo.py
浏览文件 @
40fcba5e
...
...
@@ -26,7 +26,7 @@ class RudoIE(InfoExtractor):
}
@
classmethod
def
_extract_url
(
self
,
webpage
):
def
_extract_url
(
cls
,
webpage
):
mobj
=
re
.
search
(
r
'<iframe[^>]+src=(?P<q1>[\'"])(?P<url>(?:https?:)?//rudo\.video/vod/[0-9a-zA-Z]+)(?P=q1)'
,
webpage
)
...
...
youtube_dl/extractor/viewlift.py
浏览文件 @
40fcba5e
...
...
@@ -68,7 +68,7 @@ def _real_extract(self, url):
type_
=
source
.
get
(
'type'
)
ext
=
determine_ext
(
file_
)
format_id
=
source
.
get
(
'label'
)
or
ext
if
all
(
v
==
'm3u8'
or
v
==
'hls'
for
v
in
(
type_
,
ext
)):
if
all
(
v
in
(
'm3u8'
,
'hls'
)
for
v
in
(
type_
,
ext
)):
formats
.
extend
(
self
.
_extract_m3u8_formats
(
file_
,
video_id
,
'mp4'
,
m3u8_id
=
'hls'
))
else
:
...
...
youtube_dl/extractor/vlive.py
浏览文件 @
40fcba5e
...
...
@@ -70,9 +70,9 @@ def _real_extract(self, url):
status
,
long_video_id
,
key
=
params
[
2
],
params
[
5
],
params
[
6
]
status
=
remove_start
(
status
,
'PRODUCT_'
)
if
status
==
'LIVE_ON_AIR'
or
status
==
'BIG_EVENT_ON_AIR'
:
if
status
in
(
'LIVE_ON_AIR'
,
'BIG_EVENT_ON_AIR'
)
:
return
self
.
_live
(
video_id
,
webpage
)
elif
status
==
'VOD_ON_AIR'
or
status
==
'BIG_EVENT_INTRO'
:
elif
status
in
(
'VOD_ON_AIR'
,
'BIG_EVENT_INTRO'
)
:
if
long_video_id
and
key
:
return
self
.
_replay
(
video_id
,
webpage
,
long_video_id
,
key
)
else
:
...
...
youtube_dl/postprocessor/ffmpeg.py
浏览文件 @
40fcba5e
...
...
@@ -552,7 +552,7 @@ def run(self, info):
sub_filenames
.
append
(
old_file
)
new_file
=
subtitles_filename
(
filename
,
lang
,
new_ext
)
if
ext
==
'dfxp'
or
ext
==
'ttml'
or
ext
==
'tt'
:
if
ext
in
(
'dfxp'
,
'ttml'
,
'tt'
)
:
self
.
_downloader
.
report_warning
(
'You have requested to convert dfxp (TTML) subtitles into another format, '
'which results in style information loss'
)
...
...
youtube_dl/postprocessor/metadatafromtitle.py
浏览文件 @
40fcba5e
...
...
@@ -26,7 +26,7 @@ def format_to_regex(self, fmt):
regex
+=
r
'(?P<'
+
match
.
group
(
1
)
+
'>.+)'
lastpos
=
match
.
end
()
if
lastpos
<
len
(
fmt
):
regex
+=
re
.
escape
(
fmt
[
lastpos
:
len
(
fmt
)
])
regex
+=
re
.
escape
(
fmt
[
lastpos
:])
return
regex
def
run
(
self
,
info
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录