]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/pornflip.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
12 class PornFlipIE(InfoExtractor
):
13 _VALID_URL
= r
'https?://(?:www\.)?pornflip\.com/(?:(embed|sv|v)/)?(?P<id>[^/]+)'
16 'url': 'https://www.pornflip.com/dzv9Mtw1qj2/sv/brazzers-double-dare-two-couples-fucked-jenna-reid-maya-bijou',
20 'title': 'Brazzers - Double Dare Two couples fucked Jenna Reid Maya Bijou',
21 'description': 'md5:d2b69e6cc743c5fd158e162aa7f05821',
26 'timestamp': 1617846819,
27 'upload_date': '20210408',
28 'uploader': 'Brazzers',
32 'format': 'bestvideo',
33 'skip_download': True,
37 'url': 'https://www.pornflip.com/v/IrJEC40i21L',
38 'only_matching': True,
41 'url': 'https://www.pornflip.com/Z3jzbChC5-P/sexintaxi-e-sereyna-gomez-czech-naked-couple',
42 'only_matching': True,
45 'url': 'https://www.pornflip.com/embed/bLcDFxnrZnU',
46 'only_matching': True,
49 _HOST
= 'www.pornflip.com'
51 def _real_extract(self
, url
):
52 video_id
= self
._match
_id
(url
)
53 webpage
= self
._download
_webpage
(
54 'https://{}/sv/{}'.format(self
._HOST
, video_id
), video_id
, headers
={'host': self._HOST}
)
55 description
= self
._html
_search
_regex
(r
'&p\[summary\]=(.*?)\s*&p', webpage
, 'description', fatal
=False)
56 duration
= self
._search
_regex
(r
'"duration":\s+"([^"]+)",', webpage
, 'duration', fatal
=False)
57 view_count
= self
._search
_regex
(r
'"interactionCount":\s+"([^"]+)"', webpage
, 'view_count', fatal
=False)
58 title
= self
._html
_search
_regex
(r
'id="mediaPlayerTitleLink"[^>]*>(.+)</a>', webpage
, 'title', fatal
=False)
59 uploader
= self
._html
_search
_regex
(r
'class="title-chanel"[^>]*>[^<]*<a[^>]*>([^<]+)<', webpage
, 'uploader', fatal
=False)
60 upload_date
= self
._search
_regex
(r
'"uploadDate":\s+"([^"]+)",', webpage
, 'upload_date', fatal
=False)
61 likes
= self
._html
_search
_regex
(
62 r
'class="btn btn-up-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<', webpage
, 'like_count', fatal
=False)
63 dislikes
= self
._html
_search
_regex
(
64 r
'class="btn btn-down-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<', webpage
, 'dislike_count', fatal
=False)
65 mpd_url
= self
._search
_regex
(r
'"([^"]+userscontent.net/dash/[0-9]+/manifest.mpd[^"]*)"', webpage
, 'mpd_url').replace('&', '&')
66 formats
= self
._extract
_mpd
_formats
(mpd_url
, video_id
, mpd_id
='dash')
67 self
._sort
_formats
(formats
)
71 'description': description
,
72 'dislike_count': int_or_none(dislikes
),
73 'duration': parse_duration(duration
),
76 'like_count': int_or_none(likes
),
77 'timestamp': parse_iso8601(upload_date
),
78 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
81 'view_count': int_or_none(view_count
),