5 from .common
import InfoExtractor
8 class DoodStreamIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?dood\.(?:to|watch|so|pm)/[ed]/(?P<id>[a-z0-9]+)'
11 'url': 'http://dood.to/e/5s1wmbdacezb',
12 'md5': '4568b83b31e13242b3f1ff96c55f0595',
16 'title': 'Kat Wonders - Monthly May 2020',
17 'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
18 'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
21 'url': 'http://dood.watch/d/5s1wmbdacezb',
22 'md5': '4568b83b31e13242b3f1ff96c55f0595',
26 'title': 'Kat Wonders - Monthly May 2020',
27 'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
28 'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
31 'url': 'https://dood.to/d/jzrxn12t2s7n',
32 'md5': '3207e199426eca7c2aa23c2872e6728a',
36 'title': 'Stacy Cruz Cute ALLWAYSWELL',
37 'description': 'Stacy Cruz Cute ALLWAYSWELL | DoodStream.com',
38 'thumbnail': 'https://img.doodcdn.com/snaps/8edqd5nppkac3x8u.jpg',
41 'url': 'https://dood.so/d/jzrxn12t2s7n',
45 def _real_extract(self
, url
):
46 video_id
= self
._match
_id
(url
)
47 url
= f
'https://dood.to/e/{video_id}'
48 webpage
= self
._download
_webpage
(url
, video_id
)
50 title
= self
._html
_search
_meta
(
51 ('og:title', 'twitter:title'), webpage
, default
=None) or self
._html
_extract
_title
(webpage
)
52 thumb
= self
._html
_search
_meta
(['og:image', 'twitter:image'], webpage
, default
=None)
53 token
= self
._html
_search
_regex
(r
'[?&]token=([a-z0-9]+)[&\']', webpage, 'token
')
54 description = self._html_search_meta(
55 ['og
:description
', 'description
', 'twitter
:description
'], webpage, default=None)
58 'User
-Agent
': 'Mozilla
/5.0 (Windows NT
6.1; WOW64
; rv
:53.0) Gecko
/20100101 Firefox
/66.0',
62 pass_md5 = self._html_search_regex(r'(/pass_md5
.*?
)\'', webpage, 'pass_md5
')
64 self._download_webpage(f'https
://dood
.to{pass_md5}
', video_id, headers=headers),
65 *(random.choice(string.ascii_letters + string.digits) for _ in range(10)),
66 f'?token
={token}
&expiry
={int(time.time() * 1000)}
',
73 'http_headers
': headers,
75 'description
': description,