- video_title = doc.find('HEADLINE').text
- duration = int_or_none(doc.find('DURATION'), get_attr='text')
- description = doc.find('ABSTRACT')
+ affiliate_id = self._search_regex(
+ r'affiliateId\s*:\s*\'([^\']+)\'', webpage, 'affiliate id')
+
+ # See __Packages/worldnow/model/GalleryModel.as of WNGallery.swf
+ xml_url = update_url_query('http://www.kusi.com/build.asp', {
+ 'buildtype': 'buildfeaturexmlrequest',
+ 'featureType': 'Clip',
+ 'featureid': clip_id,
+ 'affiliateno': affiliate_id,
+ 'clientgroupid': '1',
+ 'rnd': int(round(random.random() * 1000000)),
+ })
+
+ doc = self._download_xml(xml_url, video_id)
+
+ video_title = xpath_text(doc, 'HEADLINE')
+ duration = float_or_none(
+ xpath_text(doc, 'DURATION', fatal=False), scale=1000)
+ description = xpath_text(doc, 'ABSTRACT', fatal=False)
+ thumbnail = xpath_text(doc, './THUMBNAILIMAGE/FILENAME', fatal=False)
+ createtion_time = timeconvert(
+ xpath_text(doc, 'rfc822creationdate', fatal=False))