- lq_doc = self._download_xml(
- 'http://interface.bilibili.cn/v_cdn_play?cid=%s' % cid,
- video_id,
- note='Downloading LQ video info'
- )
- lq_durl = lq_doc.find('.//durl')
+ hq_doc = self._download_xml(
+ 'http://interface.bilibili.com/playurl?appkey=1&cid=%s' % cid,
+ video_id,
+ note='Downloading HQ video info',
+ fatal=False,
+ )
+ hq_durls = hq_doc.findall('./durl') if hq_doc is not False else itertools.repeat(None)
+
+ assert len(lq_durls) == len(hq_durls)
+
+ i = 1
+ for lq_durl, hq_durl in zip(lq_durls, hq_durls):