mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-08 14:17:54 +01:00
changed some of the stuff the guy wants to be changed
This commit is contained in:
parent
51dedc9f73
commit
d8363c816b
@ -31,14 +31,6 @@ class ChangbaIE(InfoExtractor):
|
|||||||
'ext': 'mp3',
|
'ext': 'mp3',
|
||||||
'title': '红豆 ',
|
'title': '红豆 ',
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
'url': 'http://changba.com/s/-N00JJ30YruunrER5eBcWw',
|
|
||||||
'md5': 'cd68f8da8d8c69afbb8e4dbbbfa8b277',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '172671761',
|
|
||||||
'ext': 'mp3',
|
|
||||||
'title': '天与地 ',
|
|
||||||
}
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
@ -48,27 +40,14 @@ class ChangbaIE(InfoExtractor):
|
|||||||
title = self._search_regex(
|
title = self._search_regex(
|
||||||
r'<div[^>]+class="title"[^>]*>([^<]+)', webpage, 'title'
|
r'<div[^>]+class="title"[^>]*>([^<]+)', webpage, 'title'
|
||||||
)
|
)
|
||||||
isvideo = self._search_regex(r'&isvideo=([0-9])', webpage, 'isvideo')
|
# title = self._og_search_title(webpage)
|
||||||
ext = 'mp3' if int_or_none(isvideo) == 0 else 'mp4'
|
is_video = self._search_regex(r'&isvideo=([0-9])', webpage, 'isvideo')
|
||||||
|
ext = 'mp3' if int_or_none(is_video) == 0 else 'mp4'
|
||||||
SITE_SUBDOMAINS = [
|
|
||||||
'lzscuw',
|
|
||||||
'upscuw',
|
|
||||||
'aliuwmp3',
|
|
||||||
'upuwmp3',
|
|
||||||
'qiniuuwmp3'
|
|
||||||
]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
src_url = self._search_regex(r'var a="([^"]*)', webpage, 'url')
|
src_url = self._search_regex(r'var a="([^"]*)', webpage, 'url')
|
||||||
except:
|
except:
|
||||||
for subdomain in SITE_SUBDOMAINS:
|
src_url = 'http://lzscuw.changba.com/' + str(id) + '.' + ext
|
||||||
try:
|
|
||||||
src_url = 'http://{}.changba.com/{}.{}'.format(
|
|
||||||
subdomain, str(id), ext
|
|
||||||
)
|
|
||||||
except:
|
|
||||||
continue
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'url': src_url,
|
'url': src_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user