Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
XianxinMao
Yt Dlp
提交
f4ea5015
Y
Yt Dlp
项目概览
XianxinMao
/
Yt Dlp
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
f4ea5015
编写于
7月 20, 2023
作者:
B
bashonly
提交者:
GitHub
7月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ie/MagellanTV] Add extractor (#7616)
Closes #7529 Authored by: bashonly
上级
af868732
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
0 deletion
+51
-0
yt_dlp/extractor/_extractors.py
yt_dlp/extractor/_extractors.py
+1
-0
yt_dlp/extractor/magellantv.py
yt_dlp/extractor/magellantv.py
+50
-0
未找到文件。
yt_dlp/extractor/_extractors.py
浏览文件 @
f4ea5015
...
@@ -1012,6 +1012,7 @@
...
@@ -1012,6 +1012,7 @@
LyndaCourseIE
LyndaCourseIE
)
)
from
.m6
import
M6IE
from
.m6
import
M6IE
from
.magellantv
import
MagellanTVIE
from
.magentamusik360
import
MagentaMusik360IE
from
.magentamusik360
import
MagentaMusik360IE
from
.mailru
import
(
from
.mailru
import
(
MailRuIE
,
MailRuIE
,
...
...
yt_dlp/extractor/magellantv.py
0 → 100644
浏览文件 @
f4ea5015
from
.common
import
InfoExtractor
from
..utils
import
parse_age_limit
,
parse_duration
,
traverse_obj
class
MagellanTVIE
(
InfoExtractor
):
_VALID_URL
=
r
'https?://(?:www\.)?magellantv\.com/(?:watch|video)/(?P<id>[\w-]+)'
_TESTS
=
[{
'url'
:
'https://www.magellantv.com/watch/my-dads-on-death-row?type=v'
,
'info_dict'
:
{
'id'
:
'my-dads-on-death-row'
,
'ext'
:
'mp4'
,
'title'
:
'My Dad
\'
s On Death Row'
,
'description'
:
'md5:33ba23b9f0651fc4537ed19b1d5b0d7a'
,
'duration'
:
3780.0
,
'age_limit'
:
14
,
'tags'
:
[
'Justice'
,
'Reality'
,
'United States'
,
'True Crime'
],
},
'params'
:
{
'skip_download'
:
'm3u8'
},
},
{
'url'
:
'https://www.magellantv.com/video/james-bulger-the-new-revelations'
,
'info_dict'
:
{
'id'
:
'james-bulger-the-new-revelations'
,
'ext'
:
'mp4'
,
'title'
:
'James Bulger: The New Revelations'
,
'description'
:
'md5:7b97922038bad1d0fe8d0470d8a189f2'
,
'duration'
:
2640.0
,
'age_limit'
:
0
,
'tags'
:
[
'Investigation'
,
'True Crime'
,
'Justice'
,
'Europe'
],
},
'params'
:
{
'skip_download'
:
'm3u8'
},
}]
def
_real_extract
(
self
,
url
):
video_id
=
self
.
_match_id
(
url
)
webpage
=
self
.
_download_webpage
(
url
,
video_id
)
data
=
self
.
_search_nextjs_data
(
webpage
,
video_id
)[
'props'
][
'pageProps'
][
'reactContext'
][
'video'
][
'detail'
]
formats
,
subtitles
=
self
.
_extract_m3u8_formats_and_subtitles
(
data
[
'jwpVideoUrl'
],
video_id
)
return
{
'id'
:
video_id
,
'formats'
:
formats
,
'subtitles'
:
subtitles
,
**
traverse_obj
(
data
,
{
'title'
:
(
'title'
,
{
str
}),
'description'
:
(
'metadata'
,
'description'
,
{
str
}),
'duration'
:
(
'duration'
,
{
parse_duration
}),
'age_limit'
:
(
'ratingCategory'
,
{
parse_age_limit
}),
'tags'
:
(
'tags'
,
...,
{
str
}),
}),
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录