1 from .common
import InfoExtractor
2 from ..networking
.exceptions
import HTTPError
3 from ..utils
import ExtractorError
, merge_dicts
6 class RecurbateIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?recurbate\.com/play\.php\?video=(?P<id>\d+)'
9 'url': 'https://recurbate.com/play.php?video=39161415',
10 'md5': 'dd2b4ec57aa3e3572cb5cf0997fca99f',
14 'description': 'md5:db48d09e4d93fc715f47fd3d6b7edd51',
15 'title': 'Performer zsnicole33 show on 2022-10-25 20:23, Chaturbate Archive – Recurbate',
18 'skip': 'Website require membership.',
21 def _real_extract(self
, url
):
22 SUBSCRIPTION_MISSING_MESSAGE
= 'This video is only available for registered users; Set your authenticated browser user agent via the --user-agent parameter.'
23 video_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(url
, video_id
)
26 except ExtractorError
as e
:
27 if isinstance(e
.cause
, HTTPError
) and e
.cause
.status
== 403:
28 self
.raise_login_required(msg
=SUBSCRIPTION_MISSING_MESSAGE
, method
='cookies')
30 token
= self
._html
_search
_regex
(r
'data-token="([^"]+)"', webpage
, 'token')
31 video_url
= f
'https://recurbate.com/api/get.php?video={video_id}&token={token}'
33 video_webpage
= self
._download
_webpage
(video_url
, video_id
)
34 if video_webpage
== 'shall_subscribe':
35 self
.raise_login_required(msg
=SUBSCRIPTION_MISSING_MESSAGE
, method
='cookies')
36 entries
= self
._parse
_html
5_media
_entries
(video_url
, video_webpage
, video_id
)
39 'title': self
._html
_extract
_title
(webpage
, 'title'),
40 'description': self
._og
_search
_description
(webpage
),
41 'age_limit': self
._rta
_search
(webpage
),