mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-08 14:17:54 +01:00
cleaned up changba.py
This commit is contained in:
parent
0b8c02e716
commit
76a8117e48
@ -39,18 +39,14 @@ class ChangbaIE(InfoExtractor):
|
|||||||
isvideo = self._search_regex(r'&isvideo=([0-9])', webpage, 'isvideo')
|
isvideo = self._search_regex(r'&isvideo=([0-9])', webpage, 'isvideo')
|
||||||
title = self._search_regex(r'<div[^>]+class="title"[^>]*>([^<]+)', webpage, 'title')
|
title = self._search_regex(r'<div[^>]+class="title"[^>]*>([^<]+)', webpage, 'title')
|
||||||
|
|
||||||
|
ext = ".mp4"
|
||||||
if int(isvideo) == 0:
|
if int(isvideo) == 0:
|
||||||
ext = 'mp3'
|
ext = ".mp3"
|
||||||
try:
|
|
||||||
url = self._search_regex(r'([a-z]+:\/\/[0-9a-z]+\.changba\.com\/[a-z]+\/[a-z]+\/[0-9]+\/[0-9]+\.mp3)', webpage, 'url')
|
try:
|
||||||
except:
|
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')
|
||||||
url = "http://lzscuw.changba.com/" + str(id) + ".mp3"
|
except:
|
||||||
else:
|
url = "http://lzscuw.changba.com/" + str(id) + ext
|
||||||
ext = 'mp4'
|
|
||||||
try:
|
|
||||||
url = self._search_regex(r'([a-z]+:\/\/[0-9a-z]+\.changba\.com\/[a-z]+\/[a-z]+\/[0-9]+\/[0-9]+\.mp4)', webpage, 'url')
|
|
||||||
except:
|
|
||||||
url = "http://lzscuw.changba.com/" + str(id) + ".mp4"
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'url': url,
|
'url': url,
|
||||||
|
Loading…
Reference in New Issue
Block a user