[youtube] Fix extraction for domainless player URLs
[youtube-dl] / youtube_dl / extractor / tudou.py
index 63b5d5924fe3d88c95d1f9537fba07044d45e124..2aae55e7e8f8742b471e4f8ffe94ab2ae79bae25 100644 (file)
@@ -23,7 +23,7 @@ class TudouIE(InfoExtractor):
             'id': '159448201',
             'ext': 'f4v',
             'title': '卡马乔国足开大脚长传冲吊集锦',
-            'thumbnail': 're:^https?://.*\.jpg$',
+            'thumbnail': r're:^https?://.*\.jpg$',
             'timestamp': 1372113489000,
             'description': '卡马乔卡家军,开大脚先进战术不完全集锦!',
             'duration': 289.04,
@@ -36,7 +36,7 @@ class TudouIE(InfoExtractor):
             'id': '117049447',
             'ext': 'f4v',
             'title': 'La Sylphide-Bolshoi-Ekaterina Krysanova & Vyacheslav Lopatin 2012',
-            'thumbnail': 're:^https?://.*\.jpg$',
+            'thumbnail': r're:^https?://.*\.jpg$',
             'timestamp': 1349207518000,
             'description': 'md5:294612423894260f2dcd5c6c04fe248b',
             'duration': 5478.33,
@@ -65,6 +65,9 @@ class TudouIE(InfoExtractor):
         if quality:
             info_url += '&hd' + quality
         xml_data = self._download_xml(info_url, video_id, 'Opening the info XML page')
+        error = xml_data.attrib.get('error')
+        if error is not None:
+            raise ExtractorError('Tudou said: %s' % error, expected=True)
         final_url = xml_data.text
         return final_url