mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47: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'
|
||||
|
||||
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:
|
||||
url = 'http://lzscuw.changba.com/{}.{}'.format(str(id), ext)
|
||||
src_url = 'http://lzscuw.changba.com/{}.{}'.format(str(id), ext)
|
||||
|
||||
return {
|
||||
'url': url,
|
||||
'url': src_url,
|
||||
'id': id,
|
||||
'ext': ext,
|
||||
'title': title,
|
||||
|
Loading…
Reference in New Issue
Block a user