mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-24 01:22:07 +00:00
Compare commits
2 Commits
5f3a2055bb
...
9dd0709080
Author | SHA1 | Date | |
---|---|---|---|
|
9dd0709080 | ||
|
141679549f |
@ -6,53 +6,85 @@ import string
|
|||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from ..compat import compat_filter as filter
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
clean_html,
|
clean_html,
|
||||||
|
ExtractorError,
|
||||||
get_element_by_class,
|
get_element_by_class,
|
||||||
parse_duration,
|
parse_duration,
|
||||||
parse_filesize,
|
parse_filesize,
|
||||||
|
update_url_query,
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
|
url_or_none,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
class DoodStreamIE(InfoExtractor):
|
class DoodStreamIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?P<host>(?:www\.)?(dood|ds2play)\.(?:[^/]*))/[ed]/(?P<id>[a-z0-9]+)'
|
_VALID_URL = r'https?://(?P<host>(?:www\.)?dood\.(?:[^/]*))/[ed]/(?P<id>[a-z0-9]+)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://dood.li/e/h7ecgw5oqn8k',
|
'url': 'http://dood.to/e/5s1wmbdacezb',
|
||||||
'md5': '90f2af170551c17fc78bee7426890054',
|
'md5': '4568b83b31e13242b3f1ff96c55f0595',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'h7ecgw5oqn8k',
|
'id': '5s1wmbdacezb',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Free-Slow-Music - DoodStream',
|
'title': 'Kat Wonders - Monthly May 2020',
|
||||||
'thumbnail': 'https://img.doodcdn.co/splash/7mbnwydhb6kb7xyk.jpg',
|
'description': 'Kat Wonders - Monthly May 2020 | DoodStream.com',
|
||||||
|
'thumbnail': 'https://img.doodcdn.com/snaps/flyus84qgl2fsk4g.jpg',
|
||||||
|
},
|
||||||
|
'skip': 'Video not found',
|
||||||
|
}, {
|
||||||
|
'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',
|
||||||
|
},
|
||||||
|
'skip': 'Video not found',
|
||||||
|
}, {
|
||||||
|
'url': 'https://dood.to/d/jzrxn12t2s7n',
|
||||||
|
'md5': '3207e199426eca7c2aa23c2872e6728a',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'jzrxn12t2s7n',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Stacy Cruz Cute ALLWAYSWELL',
|
||||||
|
'description': 'Stacy Cruz Cute ALLWAYSWELL | DoodStream.com',
|
||||||
|
'thumbnail': 'https://img.doodcdn.com/snaps/8edqd5nppkac3x8u.jpg',
|
||||||
|
},
|
||||||
|
'skip': 'Video not found',
|
||||||
|
}, {
|
||||||
|
'url': 'https://dood.to/d/is34uy8wvaet',
|
||||||
|
'md5': '04740d3ba93bcd638aa7a097d9226710',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'is34uy8wvaet',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Akhanda (2021) Telugu DVDScr MP3 700MB',
|
||||||
|
'upload_date': '20211202',
|
||||||
|
'thumbnail': r're:https?://img\.doodcdn\.com?/[\w/]+\.jpg',
|
||||||
|
'filesize_approx': int,
|
||||||
|
'duration': 9886,
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://dood.watch/d/h7ecgw5oqn8k',
|
'url': 'https://dood.so/d/wlihoael8uog',
|
||||||
'md5': '90f2af170551c17fc78bee7426890054',
|
|
||||||
'info_dict': {
|
|
||||||
'id': 'h7ecgw5oqn8k',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Free-Slow-Music - DoodStream',
|
|
||||||
'thumbnail': 'https://img.doodcdn.co/splash/7mbnwydhb6kb7xyk.jpg',
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
'url': 'https://dood.li/d/wlihoael8uog',
|
|
||||||
'md5': '2c14444c89788cc309738c1560abe278',
|
'md5': '2c14444c89788cc309738c1560abe278',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'wlihoael8uog',
|
'id': 'wlihoael8uog',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'VID 20220319 161659 - DoodStream',
|
'title': 'VID 20220319 161659',
|
||||||
'thumbnail': 'https://img.doodcdn.co/splash/rmpnhb8ckkk79cge.jpg',
|
'thumbnail': r're:https?://img\.doodcdn\.com?/splash/rmpnhb8ckkk79cge\.jpg',
|
||||||
|
'upload_date': '20220319',
|
||||||
|
'filesize_approx': int,
|
||||||
|
'duration': 12.0,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
host = re.match(self._VALID_URL, url).groups()[0]
|
host = re.match(self._VALID_URL, url).groups()[0]
|
||||||
url = url.replace(host, 'dood.li')
|
print('https://%s/' % host)
|
||||||
host = 'dood.li'
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
if '/d/' in url:
|
if '/d/' in url:
|
||||||
@ -72,12 +104,15 @@ class DoodStreamIE(InfoExtractor):
|
|||||||
webpage, default=None)
|
webpage, default=None)
|
||||||
auth_url = ('https://%s/' % host) + self._html_search_regex(
|
auth_url = ('https://%s/' % host) + self._html_search_regex(
|
||||||
r'(/pass_md5.*?)\'', webpage, 'pass_md5')
|
r'(/pass_md5.*?)\'', webpage, 'pass_md5')
|
||||||
|
print('%s' % auth_url)
|
||||||
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
|
||||||
}
|
}
|
||||||
authpage = self._download_webpage(auth_url, video_id, headers=headers)
|
|
||||||
final_url = authpage + ''.join([random.choice(string.ascii_letters + string.digits) for _ in
|
webpage = self._download_webpage(auth_url, video_id, headers=headers)
|
||||||
|
|
||||||
|
final_url = webpage + ''.join([random.choice(string.ascii_letters + string.digits) for _ in
|
||||||
range(10)]) + "?token=" + token + "&expiry=" + str(int(time.time() * 1000))
|
range(10)]) + "?token=" + token + "&expiry=" + str(int(time.time() * 1000))
|
||||||
|
|
||||||
def get_class_text(x):
|
def get_class_text(x):
|
||||||
@ -95,3 +130,4 @@ class DoodStreamIE(InfoExtractor):
|
|||||||
'description': description,
|
'description': description,
|
||||||
'thumbnail': thumb,
|
'thumbnail': thumb,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user