- title = hd_doc.find('.//video/title').text
- flash_url = hd_doc.find('.//video/url').text
- categories = hd_doc.find('.//video/meta_sports').text.split(',')
- uploader = hd_doc.find('.//video/meta_organistation').text
+ title = xpath_text(hd_doc, './/video/title', fatal=True)
+ flash_url = xpath_text(hd_doc, './/video/url', fatal=True)
+ uploader = xpath_text(hd_doc, './/video/meta_organistation')
+ is_live = xpath_text(hd_doc, './/video/islive') == 'true'
+
+ categories = xpath_text(hd_doc, './/video/meta_sports')
+ if categories:
+ categories = categories.split(',')