]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/pornez.py
1 from .common
import InfoExtractor
2 from ..utils
import int_or_none
5 class PornezIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?pornez\.net/video(?P<id>[0-9]+)/'
8 'url': 'https://pornez.net/video344819/mistresst-funny_penis_names-wmv/',
9 'md5': '2e19a0a1cff3a5dbea0ef1b9e80bcbbc',
13 'title': r
'mistresst funny_penis_names wmv',
14 'thumbnail': r
're:^https?://.*\.jpg$',
19 def _real_extract(self
, url
):
20 video_id
= self
._match
_id
(url
)
21 webpage
= self
._download
_webpage
(url
, video_id
)
22 iframe_src
= self
._html
_search
_regex
(
23 r
'<iframe[^>]+src="(https?://pornez\.net/player/\?[^"]+)"', webpage
, 'iframe', fatal
=True)
24 title
= self
._html
_search
_meta
(['name', 'twitter:title', 'og:title'], webpage
, 'title', default
=None)
26 title
= self
._search
_regex
(r
'<h1>(.*?)</h1>', webpage
, 'title', fatal
=True)
27 thumbnail
= self
._html
_search
_meta
(['thumbnailUrl'], webpage
, 'title', default
=None)
28 webpage
= self
._download
_webpage
(iframe_src
, video_id
)
29 entries
= self
._parse
_html
5_media
_entries
(iframe_src
, webpage
, video_id
)[0]
30 for format
in entries
['formats']:
31 height
= self
._search
_regex
(r
'_(\d+)\.m3u8', format
['url'], 'height')
32 format
['format_id'] = '%sp' % height
33 format
['height'] = int_or_none(height
)
38 'thumbnail': thumbnail
,