2 from __future__
import unicode_literals
8 from .common
import InfoExtractor
11 class DoodStreamIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?dood\.(?:to|watch)/[ed]/(?P<id>[a-z0-9]+)'
14 'url': 'http://dood.to/e/5s1wmbdacezb',
15 'md5': '4568b83b31e13242b3f1ff96c55f0595',
19 'title': 'Kat Wonders - Monthly May 2020',
20 'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
21 'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
24 'url': 'http://dood.watch/d/5s1wmbdacezb',
25 'md5': '4568b83b31e13242b3f1ff96c55f0595',
29 'title': 'Kat Wonders - Monthly May 2020',
30 'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
31 'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
34 'url': 'https://dood.to/d/jzrxn12t2s7n',
35 'md5': '3207e199426eca7c2aa23c2872e6728a',
39 'title': 'Stacy Cruz Cute ALLWAYSWELL',
40 'description': 'Stacy Cruz Cute ALLWAYSWELL | DoodStream.com',
41 'thumbnail': 'https://img.doodcdn.com/snaps/8edqd5nppkac3x8u.jpg',
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
(['og:title', 'twitter:title'], webpage
, default
=None)
51 thumb
= self
._html
_search
_meta
(['og:image', 'twitter:image'], webpage
, default
=None)
52 token
= self
._html
_search
_regex
(r
'[?&]token=([a-z0-9]+)[&\']', webpage, 'token
')
53 description = self._html_search_meta(
54 ['og
:description
', 'description
', 'twitter
:description
'], webpage, default=None)
57 'User
-Agent
': 'Mozilla
/5.0 (Windows NT
6.1; WOW64
; rv
:53.0) Gecko
/20100101 Firefox
/66.0',
61 pass_md5 = self._html_search_regex(r'(/pass_md5
.*?
)\'', webpage, 'pass_md5
')
63 self._download_webpage(f'https
://dood
.to{pass_md5}
', video_id, headers=headers),
64 *(random.choice(string.ascii_letters + string.digits) for _ in range(10)),
65 f'?token
={token}
&expiry
={int(time.time() * 1000)}
',
72 'http_headers
': headers,
74 'description
': description,