youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 3fa6b6e29371325d2ba57fb3dcfd776810bb795a
parent 3c50b99ab4f39b3b78d5f9d5c20f8d7ce682d0fd
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Sat, 19 Apr 2014 19:51:04 +0200

[steam] Modernize

Diffstat:
Myoutube_dl/extractor/steam.py | 32++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/youtube_dl/extractor/steam.py b/youtube_dl/extractor/steam.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import re from .common import InfoExtractor @@ -17,22 +19,24 @@ class SteamIE(InfoExtractor): _VIDEO_PAGE_TEMPLATE = 'http://store.steampowered.com/video/%s/' _AGECHECK_TEMPLATE = 'http://store.steampowered.com/agecheck/video/%s/?snr=1_agecheck_agecheck__age-gate&ageDay=1&ageMonth=January&ageYear=1970' _TEST = { - u"url": u"http://store.steampowered.com/video/105600/", - u"playlist": [ + "url": "http://store.steampowered.com/video/105600/", + "playlist": [ { - u"file": u"81300.flv", - u"md5": u"f870007cee7065d7c76b88f0a45ecc07", - u"info_dict": { - u"title": u"Terraria 1.1 Trailer", - u'playlist_index': 1, + "md5": "f870007cee7065d7c76b88f0a45ecc07", + "info_dict": { + 'id': '81300', + 'ext': 'flv', + "title": "Terraria 1.1 Trailer", + 'playlist_index': 1, } }, { - u"file": u"80859.flv", - u"md5": u"61aaf31a5c5c3041afb58fb83cbb5751", - u"info_dict": { - u"title": u"Terraria Trailer", - u'playlist_index': 2, + "md5": "61aaf31a5c5c3041afb58fb83cbb5751", + "info_dict": { + 'id': '80859', + 'ext': 'flv', + "title": "Terraria Trailer", + 'playlist_index': 2, } } ] @@ -73,7 +77,7 @@ class SteamIE(InfoExtractor): video_url = vid.group('videoURL') video_thumb = thumb.group('thumbnail') if not video_url: - raise ExtractorError(u'Cannot find video url for %s' % video_id) + raise ExtractorError('Cannot find video url for %s' % video_id) info = { 'id':video_id, 'url':video_url, @@ -82,4 +86,4 @@ class SteamIE(InfoExtractor): 'thumbnail': video_thumb } videos.append(info) - return [self.playlist_result(videos, gameID, game_title)] + return self.playlist_result(videos, gameID, game_title)