[tudou] Use single quotes and compat_str
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Sep 2015 18:57:14 +0000 (02:57 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Sep 2015 18:59:43 +0000 (02:59 +0800)
youtube_dl/extractor/tudou.py

index 53ba8511f419b696fe199c27d1a8ff5dafbb65ef..5f7ac4b35b6c4576e5fb0998d56eb21ec522b58a 100644 (file)
@@ -3,6 +3,7 @@
 from __future__ import unicode_literals
 
 from .common import InfoExtractor
+from ..compat import compat_str
 
 
 class TudouIE(InfoExtractor):
@@ -32,7 +33,7 @@ class TudouIE(InfoExtractor):
     _PLAYER_URL = 'http://js.tudouui.com/bin/lingtong/PortalPlayer_177.swf'
 
     def _url_for_id(self, video_id, quality=None):
-        info_url = "http://v2.tudou.com/f?id=" + str(video_id)
+        info_url = 'http://v2.tudou.com/f?id=' + compat_str(video_id)
         if quality:
             info_url += '&hd' + quality
         xml_data = self._download_xml(info_url, video_id, "Opening the info XML page")