import json
from requests_html import HTMLSession
session = HTMLSession()
def main():
while True:
url = input('该接口支持腾讯视频,优酷视频,部分B站视频请输入
')
r = session.request(method='get',url="https://p2p.1616jx.com/api/api.php?url=%s"%url)
data = json.loads(r.text.strip('();'))
if r.status_code == 200:
print('解析成功')
if data.get('success')==1:
print('解析成功')
print(data.get('title'))
print('请在浏览器中打开网址')
print(data.get('url'))
print('********************源地址****************************
')
#print(data)
break
else:
print('解析失败,或者这视频站点不支持解析')
if __name__ == '__main__':
main()
追龙地址
https://www.697313.com:65/20190609/iVHftMBJ/index.m3u8