changed spaces to tabs (by yt-dl standards), fixed bugs, but still won't download. need to figure out how the whole process works to integrate correctly

pull/8/head
Kevin Ngo 13 years ago
parent 073d7a5985
commit b20d4f8626

@ -3481,7 +3481,7 @@ class XVideosIE(InfoExtractor):
self._downloader.trouble(u'\nERROR: unable to download ' + video_id)
class SoundcloudIE(InformationExtractor):
class SoundcloudIE(InfoExtractor):
"""Information extractor for soundcloud.com
To access the media, the uid of the song and a stream token
must be extracted from the page source and the script must make
@ -3516,9 +3516,9 @@ class SoundcloudIE(InformationExtractor):
return
# extract uploader (which is in the url)
uploader = mobj.group(3).decode('utf-8')
uploader = mobj.group(1).decode('utf-8')
# extract simple title (uploader + slug of song title)
slug_title = mobj.group(4).decode('utf-8')
slug_title = mobj.group(2).decode('utf-8')
simple_title = uploader + '-' + slug_title
self.report_webpage('%s/%s' % (uploader, slug_title))
@ -3556,8 +3556,12 @@ class SoundcloudIE(InformationExtractor):
except:
pass
# for soundcloud, a request must be made to a cross domain to establish
# needed cookies
request = urllib2.Request('http://media.soundcloud.com/crossdomain.xml', std_headers)
try:
self._download.process_info({
self._downloader.process_info({
'id': video_id,
'url': video_url,
'uploader': uploader,
@ -3569,6 +3573,8 @@ class SoundcloudIE(InformationExtractor):
'player_url': None,
'description': description
})
except UnavailableVideoError:
self._downloader.trouble(u'\nERROR: unable to download video')
class PostProcessor(object):
"""Post Processor class.
@ -3966,6 +3972,7 @@ def gen_extractors():
EscapistIE(),
CollegeHumorIE(),
XVideosIE(),
SoundcloudIE(),
GenericIE()
]

Loading…
Cancel
Save