mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 11:24:02 +03:00
Change sina API, fix #280
This commit is contained in:
parent
31a1f6b070
commit
81ce94e348
@ -5,7 +5,8 @@ __all__ = ['sina_download', 'sina_download_by_vid', 'sina_download_by_vkey']
|
|||||||
from ..common import *
|
from ..common import *
|
||||||
|
|
||||||
def video_info(id):
|
def video_info(id):
|
||||||
xml = get_content('http://www.tucao.cc/api/sina.php?vid=%s' % id, decoded=True)
|
xml = get_content('http://interface.bilibili.tv/playurl?vid=%s' % id, headers=fake_headers, decoded=True)
|
||||||
|
#xml = get_content('http://www.tucao.cc/api/sina.php?vid=%s' % id, headers=fake_headers, decoded=True)
|
||||||
urls = re.findall(r'<url>(?:<!\[CDATA\[)?(.*?)(?:\]\]>)?</url>', xml)
|
urls = re.findall(r'<url>(?:<!\[CDATA\[)?(.*?)(?:\]\]>)?</url>', xml)
|
||||||
name = match1(xml, r'<vname>(?:<!\[CDATA\[)?(.+?)(?:\]\]>)?</vname>')
|
name = match1(xml, r'<vname>(?:<!\[CDATA\[)?(.+?)(?:\]\]>)?</vname>')
|
||||||
vstr = match1(xml, r'<vstr>(?:<!\[CDATA\[)?(.+?)(?:\]\]>)?</vstr>')
|
vstr = match1(xml, r'<vstr>(?:<!\[CDATA\[)?(.+?)(?:\]\]>)?</vstr>')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user