mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 23:26:53 +01:00
parent
85553414ae
commit
67fb99f193
@ -20,6 +20,16 @@ class DoodStreamIE(InfoExtractor):
|
|||||||
'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
|
'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
|
||||||
'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
|
'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'url': 'http://dood.watch/d/5s1wmbdacezb',
|
||||||
|
'md5': '4568b83b31e13242b3f1ff96c55f0595',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '5s1wmbdacezb',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Kat Wonders - Monthly May 2020',
|
||||||
|
'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
|
||||||
|
'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://dood.to/d/jzrxn12t2s7n',
|
'url': 'https://dood.to/d/jzrxn12t2s7n',
|
||||||
'md5': '3207e199426eca7c2aa23c2872e6728a',
|
'md5': '3207e199426eca7c2aa23c2872e6728a',
|
||||||
@ -34,31 +44,26 @@ class DoodStreamIE(InfoExtractor):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
url = f'https://dood.to/e/{video_id}'
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
if '/d/' in url:
|
title = self._html_search_meta(['og:title', 'twitter:title'], webpage, default=None)
|
||||||
url = "https://dood.to" + self._html_search_regex(
|
thumb = self._html_search_meta(['og:image', 'twitter:image'], webpage, default=None)
|
||||||
r'<iframe src="(/e/[a-z0-9]+)"', webpage, 'embed')
|
|
||||||
video_id = self._match_id(url)
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
|
|
||||||
title = self._html_search_meta(['og:title', 'twitter:title'],
|
|
||||||
webpage, default=None)
|
|
||||||
thumb = self._html_search_meta(['og:image', 'twitter:image'],
|
|
||||||
webpage, default=None)
|
|
||||||
token = self._html_search_regex(r'[?&]token=([a-z0-9]+)[&\']', webpage, 'token')
|
token = self._html_search_regex(r'[?&]token=([a-z0-9]+)[&\']', webpage, 'token')
|
||||||
description = self._html_search_meta(
|
description = self._html_search_meta(
|
||||||
['og:description', 'description', 'twitter:description'],
|
['og:description', 'description', 'twitter:description'], webpage, default=None)
|
||||||
webpage, default=None)
|
|
||||||
auth_url = 'https://dood.to' + self._html_search_regex(
|
|
||||||
r'(/pass_md5.*?)\'', webpage, 'pass_md5')
|
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/66.0',
|
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/66.0',
|
||||||
'referer': url
|
'referer': url
|
||||||
}
|
}
|
||||||
|
|
||||||
webpage = self._download_webpage(auth_url, video_id, headers=headers)
|
pass_md5 = self._html_search_regex(r'(/pass_md5.*?)\'', webpage, 'pass_md5')
|
||||||
final_url = webpage + ''.join([random.choice(string.ascii_letters + string.digits) for _ in range(10)]) + "?token=" + token + "&expiry=" + str(int(time.time() * 1000))
|
final_url = ''.join((
|
||||||
|
self._download_webpage(f'https://dood.to{pass_md5}', video_id, headers=headers),
|
||||||
|
*(random.choice(string.ascii_letters + string.digits) for _ in range(10)),
|
||||||
|
f'?token={token}&expiry={int(time.time() * 1000)}',
|
||||||
|
))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user