1 from .common
import InfoExtractor
9 class PornFlipIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?pornflip\.com/(?:(embed|sv|v)/)?(?P<id>[^/]+)'
13 'url': 'https://www.pornflip.com/dzv9Mtw1qj2/sv/brazzers-double-dare-two-couples-fucked-jenna-reid-maya-bijou',
17 'title': 'Brazzers - Double Dare Two couples fucked Jenna Reid Maya Bijou',
18 'description': 'md5:d2b69e6cc743c5fd158e162aa7f05821',
23 'timestamp': 1617846819,
24 'upload_date': '20210408',
25 'uploader': 'Brazzers',
29 'skip_download': True,
33 'url': 'https://www.pornflip.com/v/IrJEC40i21L',
34 'only_matching': True,
37 'url': 'https://www.pornflip.com/Z3jzbChC5-P/sexintaxi-e-sereyna-gomez-czech-naked-couple',
38 'only_matching': True,
41 'url': 'https://www.pornflip.com/embed/bLcDFxnrZnU',
42 'only_matching': True,
45 _HOST
= 'www.pornflip.com'
47 def _real_extract(self
, url
):
48 video_id
= self
._match
_id
(url
)
49 webpage
= self
._download
_webpage
(
50 'https://{}/sv/{}'.format(self
._HOST
, video_id
), video_id
, headers
={'host': self
._HOST
})
51 description
= self
._html
_search
_regex
(r
'&p\[summary\]=(.*?)\s*&p', webpage
, 'description', fatal
=False)
52 duration
= self
._search
_regex
(r
'"duration":\s+"([^"]+)",', webpage
, 'duration', fatal
=False)
53 view_count
= self
._search
_regex
(r
'"interactionCount":\s+"([^"]+)"', webpage
, 'view_count', fatal
=False)
54 title
= self
._html
_search
_regex
(r
'id="mediaPlayerTitleLink"[^>]*>(.+)</a>', webpage
, 'title', fatal
=False)
55 uploader
= self
._html
_search
_regex
(r
'class="title-chanel"[^>]*>[^<]*<a[^>]*>([^<]+)<', webpage
, 'uploader', fatal
=False)
56 upload_date
= self
._search
_regex
(r
'"uploadDate":\s+"([^"]+)",', webpage
, 'upload_date', fatal
=False)
57 likes
= self
._html
_search
_regex
(
58 r
'class="btn btn-up-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<', webpage
, 'like_count', fatal
=False)
59 dislikes
= self
._html
_search
_regex
(
60 r
'class="btn btn-down-rating[^>]*>[^<]*<i[^>]*>[^<]*</i>[^>]*<span[^>]*>[^0-9]*([0-9]+)[^<0-9]*<', webpage
, 'dislike_count', fatal
=False)
61 mpd_url
= self
._search
_regex
(r
'"([^"]+userscontent.net/dash/[0-9]+/manifest.mpd[^"]*)"', webpage
, 'mpd_url').replace('&', '&')
62 formats
= self
._extract
_mpd
_formats
(mpd_url
, video_id
, mpd_id
='dash')
66 'description': description
,
67 'dislike_count': int_or_none(dislikes
),
68 'duration': parse_duration(duration
),
71 'like_count': int_or_none(likes
),
72 'timestamp': parse_iso8601(upload_date
),
73 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
76 'view_count': int_or_none(view_count
),