mirror of https://github.com/yt-dlp/yt-dlp.git
[tudou] Use single quotes and compat_str
This commit is contained in:
parent
349b3a2ea0
commit
b264c21302
|
@ -3,6 +3,7 @@
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..compat import compat_str
|
||||||
|
|
||||||
|
|
||||||
class TudouIE(InfoExtractor):
|
class TudouIE(InfoExtractor):
|
||||||
|
@ -32,7 +33,7 @@ class TudouIE(InfoExtractor):
|
||||||
_PLAYER_URL = 'http://js.tudouui.com/bin/lingtong/PortalPlayer_177.swf'
|
_PLAYER_URL = 'http://js.tudouui.com/bin/lingtong/PortalPlayer_177.swf'
|
||||||
|
|
||||||
def _url_for_id(self, video_id, quality=None):
|
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:
|
if quality:
|
||||||
info_url += '&hd' + quality
|
info_url += '&hd' + quality
|
||||||
xml_data = self._download_xml(info_url, video_id, "Opening the info XML page")
|
xml_data = self._download_xml(info_url, video_id, "Opening the info XML page")
|
||||||
|
|
Loading…
Reference in New Issue