mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-25 08:41:48 +02:00
parent
b2eeee0ce0
commit
8eb7ba82ca
@ -1,5 +1,6 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_urllib_parse_urlparse
|
||||
@ -8,6 +9,8 @@
|
||||
mimetype2ext,
|
||||
remove_end,
|
||||
url_or_none,
|
||||
unified_strdate,
|
||||
strip_or_none,
|
||||
)
|
||||
|
||||
|
||||
@ -21,6 +24,10 @@ class IwaraIE(InfoExtractor):
|
||||
'ext': 'mp4',
|
||||
'title': '【MMD R-18】ガールフレンド carry_me_off',
|
||||
'age_limit': 18,
|
||||
'thumbnail': 'https://i.iwara.tv/sites/default/files/videos/thumbnails/7951/thumbnail-7951_0001.png',
|
||||
'uploader': 'Reimu丨Action',
|
||||
'upload_date': '20150828',
|
||||
'description': 'md5:1d4905ce48c66c9299c617f08e106e0f',
|
||||
},
|
||||
}, {
|
||||
'url': 'http://ecchi.iwara.tv/videos/Vb4yf2yZspkzkBO',
|
||||
@ -73,8 +80,17 @@ def _real_extract(self, url):
|
||||
r'<title>([^<]+)</title>', webpage, 'title'), ' | Iwara')
|
||||
|
||||
thumbnail = self._html_search_regex(
|
||||
r'<video[^>]+id=[\'"]video-player[\'"][^>]+poster=[\'"]([^\'"]+)',
|
||||
webpage, 'thumbnail', default=None)
|
||||
r'poster=[\'"]([^\'"]+)', webpage, 'thumbnail', default=None)
|
||||
|
||||
uploader = self._html_search_regex(
|
||||
r'class="username">([^<]+)', webpage, 'uploader', fatal=False)
|
||||
|
||||
upload_date = unified_strdate(self._html_search_regex(
|
||||
r'作成日:([^\s]+)', webpage, 'upload_date', fatal=False))
|
||||
|
||||
description = strip_or_none(self._search_regex(
|
||||
r'<p>(.+?(?=</div))', webpage, 'description', fatal=False,
|
||||
flags=re.DOTALL))
|
||||
|
||||
formats = []
|
||||
for a_format in video_data:
|
||||
@ -101,4 +117,7 @@ def _real_extract(self, url):
|
||||
'age_limit': age_limit,
|
||||
'formats': formats,
|
||||
'thumbnail': self._proto_relative_url(thumbnail, 'https:'),
|
||||
'uploader': uploader,
|
||||
'upload_date': upload_date,
|
||||
'description': description,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user