mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
parent
b2eeee0ce0
commit
8eb7ba82ca
1 changed files with 21 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_urllib_parse_urlparse
|
from ..compat import compat_urllib_parse_urlparse
|
||||||
|
@ -8,6 +9,8 @@
|
||||||
mimetype2ext,
|
mimetype2ext,
|
||||||
remove_end,
|
remove_end,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
|
unified_strdate,
|
||||||
|
strip_or_none,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +24,10 @@ class IwaraIE(InfoExtractor):
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': '【MMD R-18】ガールフレンド carry_me_off',
|
'title': '【MMD R-18】ガールフレンド carry_me_off',
|
||||||
'age_limit': 18,
|
'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',
|
'url': 'http://ecchi.iwara.tv/videos/Vb4yf2yZspkzkBO',
|
||||||
|
@ -73,8 +80,17 @@ def _real_extract(self, url):
|
||||||
r'<title>([^<]+)</title>', webpage, 'title'), ' | Iwara')
|
r'<title>([^<]+)</title>', webpage, 'title'), ' | Iwara')
|
||||||
|
|
||||||
thumbnail = self._html_search_regex(
|
thumbnail = self._html_search_regex(
|
||||||
r'<video[^>]+id=[\'"]video-player[\'"][^>]+poster=[\'"]([^\'"]+)',
|
r'poster=[\'"]([^\'"]+)', webpage, 'thumbnail', default=None)
|
||||||
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 = []
|
formats = []
|
||||||
for a_format in video_data:
|
for a_format in video_data:
|
||||||
|
@ -101,4 +117,7 @@ def _real_extract(self, url):
|
||||||
'age_limit': age_limit,
|
'age_limit': age_limit,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': self._proto_relative_url(thumbnail, 'https:'),
|
'thumbnail': self._proto_relative_url(thumbnail, 'https:'),
|
||||||
|
'uploader': uploader,
|
||||||
|
'upload_date': upload_date,
|
||||||
|
'description': description,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue