projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f8d03f
)
Better error reporting for SoundCloud IE
author
Philipp Hagemeister
<phihag@phihag.de>
Thu, 6 Dec 2012 23:40:13 +0000
(
00:40
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Thu, 6 Dec 2012 23:40:13 +0000
(
00:40
+0100)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index 1857360d40764ef996465fb0df8aa290bd625cb8..334eb59d8745ec4ca4a2518b0516f1f86b4cf17b 100644
(file)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-2825,9
+2825,10
@@
class SoundcloudIE(InfoExtractor):
self.report_webpage('%s/%s' % (uploader, slug_title))
self.report_webpage('%s/%s' % (uploader, slug_title))
- request = compat_urllib_request.Request('http://soundcloud.com/%s/%s' % (uploader, slug_title))
+ url = 'https://soundcloud.com/%s/%s' % (uploader, slug_title)
+ request = compat_urllib_request.Request(url)
try:
try:
-
webpage_bytes
= compat_urllib_request.urlopen(request).read()
+
urlo
= compat_urllib_request.urlopen(request).read()
webpage = webpage_bytes.decode('utf-8')
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self._downloader.trouble(u'ERROR: unable to download video webpage: %s' % compat_str(err))
webpage = webpage_bytes.decode('utf-8')
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self._downloader.trouble(u'ERROR: unable to download video webpage: %s' % compat_str(err))
@@
-2840,6
+2841,9
@@
class SoundcloudIE(InfoExtractor):
if mobj:
video_id = mobj.group(1)
stream_token = mobj.group(2)
if mobj:
video_id = mobj.group(1)
stream_token = mobj.group(2)
+ else:
+ self._downloader.trouble(u'ERROR: unable to find video ID in Soundcloud file')
+ return
# extract unsimplified title
mobj = re.search('"title":"(.*?)",', webpage)
# extract unsimplified title
mobj = re.search('"title":"(.*?)",', webpage)