Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
XianxinMao
Yt Dlp
提交
8d9b9022
Y
Yt Dlp
项目概览
XianxinMao
/
Yt Dlp
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
8d9b9022
编写于
7月 20, 2021
作者:
M
mzbaulhaque
提交者:
GitHub
7月 19, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[pornflip] Add new extractor (#523)
Authored-by: mzbaulhaque
上级
fe93e2c4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
83 addition
and
0 deletion
+83
-0
yt_dlp/extractor/extractors.py
yt_dlp/extractor/extractors.py
+1
-0
yt_dlp/extractor/pornflip.py
yt_dlp/extractor/pornflip.py
+82
-0
未找到文件。
yt_dlp/extractor/extractors.py
浏览文件 @
8d9b9022
...
...
@@ -1015,6 +1015,7 @@
from
.popcorntv
import
PopcornTVIE
from
.porn91
import
Porn91IE
from
.porncom
import
PornComIE
from
.pornflip
import
PornFlipIE
from
.pornhd
import
PornHdIE
from
.pornhub
import
(
PornHubIE
,
...
...
yt_dlp/extractor/pornflip.py
0 → 100644
浏览文件 @
8d9b9022
# coding: utf-8
from
__future__
import
unicode_literals
from
.common
import
InfoExtractor
from
..utils
import
(
int_or_none
,
parse_duration
,
parse_iso8601
)
class
PornFlipIE
(
InfoExtractor
):
_VALID_URL
=
r
'https?://(?:www\.)?pornflip\.com/(?:(embed|sv|v)/)?(?P<id>[^/]+)'
_TESTS
=
[
{
'url'
:
'https://www.pornflip.com/dzv9Mtw1qj2/sv/brazzers-double-dare-two-couples-fucked-jenna-reid-maya-bijou'
,
'info_dict'
:
{
'id'
:
'dzv9Mtw1qj2'
,
'ext'
:
'mp4'
,
'title'
:
'Brazzers - Double Dare Two couples fucked Jenna Reid Maya Bijou'
,
'description'
:
'md5:d2b69e6cc743c5fd158e162aa7f05821'
,
'duration'
:
476
,
'like_count'
:
int
,
'dislike_count'
:
int
,
'view_count'
:
int
,
'timestamp'
:
1617846819
,
'upload_date'
:
'20210408'
,
'uploader'
:
'Brazzers'
,
'age_limit'
:
18
,
},
'params'
:
{
'format'
:
'bestvideo'
,
'skip_download'
:
True
,
},
},
{
'url'
:
'https://www.pornflip.com/v/IrJEC40i21L'
,
'only_matching'
:
True
,
},
{
'url'
:
'https://www.pornflip.com/Z3jzbChC5-P/sexintaxi-e-sereyna-gomez-czech-naked-couple'
,
'only_matching'
:
True
,
},
{
'url'
:
'https://www.pornflip.com/embed/bLcDFxnrZnU'
,
'only_matching'
:
True
,
},
]
_HOST
=
'www.pornflip.com'
def
_real_extract
(
self
,
url
):
video_id
=
self
.
_match_id
(
url
)
webpage
=
self
.
_download_webpage
(
'https://{}/sv/{}'
.
format
(
self
.
_HOST
,
video_id
),
video_id
,
headers
=
{
'host'
:
self
.
_HOST
})
description
=
self
.
_html_search_regex
(
r
'&p\[summary\]=(.*?)\s*&p'
,
webpage
,
'description'
,
fatal
=
False
)
duration
=
self
.
_search_regex
(
r
'"duration":\s+"([^"]+)",'
,
webpage
,
'duration'
,
fatal
=
False
)
view_count
=
self
.
_search_regex
(
r
'"interactionCount":\s+"([^"]+)"'
,
webpage
,
'view_count'
,
fatal
=
False
)
title
=
self
.
_html_search_regex
(
r
'id="mediaPlayerTitleLink"[^>]*>(.+)</a>'
,
webpage
,
'title'
,
fatal
=
False
)
uploader
=
self
.
_html_search_regex
(
r
'class="title-chanel"[^>]*>[^<]*<a[^>]*>([^<]+)<'
,
webpage
,
'uploader'
,
fatal
=
False
)
upload_date
=
self
.
_search_regex
(
r
'"uploadDate":\s+"([^"]+)",'
,
webpage
,
'upload_date'
,
fatal
=
False
)
likes
=
self
.
_html_search_regex
(
r
'class="btn btn-up-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<'
,
webpage
,
'like_count'
,
fatal
=
False
)
dislikes
=
self
.
_html_search_regex
(
r
'class="btn btn-down-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<'
,
webpage
,
'dislike_count'
,
fatal
=
False
)
mpd_url
=
self
.
_search_regex
(
r
'"([^"]+userscontent.net/dash/[0-9]+/manifest.mpd[^"]*)"'
,
webpage
,
'mpd_url'
).
replace
(
'&'
,
'&'
)
formats
=
self
.
_extract_mpd_formats
(
mpd_url
,
video_id
,
mpd_id
=
'dash'
)
self
.
_sort_formats
(
formats
)
return
{
'age_limit'
:
18
,
'description'
:
description
,
'dislike_count'
:
int_or_none
(
dislikes
),
'duration'
:
parse_duration
(
duration
),
'formats'
:
formats
,
'id'
:
video_id
,
'like_count'
:
int_or_none
(
likes
),
'timestamp'
:
parse_iso8601
(
upload_date
),
'thumbnail'
:
self
.
_og_search_thumbnail
(
webpage
),
'title'
:
title
,
'uploader'
:
uploader
,
'view_count'
:
int_or_none
(
view_count
),
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录