hotstar-hound.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:hotstar-hound 作者: baddymaster 项目源码 文件源码
def fetchStreamURL(video_id):
    cdn_url = "http://getcdn.hotstar.com/AVS/besc?action=GetCDN&asJson=Y&channel=TABLET&id=" + video_id + "&type=VOD"
    response = r.get(cdn_url)

    if str(response) == '<Response [200]>':
        json_response = json.loads(response.text.encode('utf-8'))
        stream_url = json_response['resultObj']['src'].encode('utf-8')
    else:
        print('HTTP Error. Unable to connect to Hotstar. Exiting.\n')
        sys.exit(0)

    return stream_url
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号