mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-01 20:57:54 +01:00
simplified try block regex and specified better name for url
This commit is contained in:
parent
8ac9af1ce2
commit
5de4ebf7b5
@ -49,12 +49,12 @@ class ChangbaIE(InfoExtractor):
|
|||||||
ext = 'mp3' if int(isvideo) == 0 else 'mp4'
|
ext = 'mp3' if int(isvideo) == 0 else 'mp4'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url = self._search_regex(r'([a-z]+:\/\/[0-9a-z]+\.changba\.com\/[a-z]+\/[a-z]+\/[0-9]+\/[0-9]+\.mp[3-4])', webpage, 'url')
|
src_url = self._search_regex(r'var a="([^"]*)', webpage, 'url')
|
||||||
except:
|
except:
|
||||||
url = 'http://lzscuw.changba.com/{}.{}'.format(str(id), ext)
|
src_url = 'http://lzscuw.changba.com/{}.{}'.format(str(id), ext)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'url': url,
|
'url': src_url,
|
||||||
'id': id,
|
'id': id,
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
Loading…
Reference in New Issue
Block a user