aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-05-05 03:12:41 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-05-05 03:15:17 +0200
commit20991253334c069efac6986bb51cc28058809026 (patch)
treeee97223f3e9fea467dfd38ffc1ddc6a5a14ff51e /youtube_dl/extractor/generic.py
parentb48f147d5a36b16e421b9b91fcc72b62e695c948 (diff)
[soundcloud/generic] Add support for playlists
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index d7f0a4d39..1ae55dc5a 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -348,10 +348,7 @@ class GenericIE(InfoExtractor):
if url.startswith('//'):
return {
'_type': 'url',
- 'url': (
- 'http:'
- if self._downloader.params.get('prefer_insecure', False)
- else 'https:') + url,
+ 'url': self.http_scheme() + url,
}
parsed_url = compat_urlparse.urlparse(url)
@@ -636,6 +633,14 @@ class GenericIE(InfoExtractor):
if smotri_url:
return self.url_result(smotri_url, 'Smotri')
+ # Look for embeded soundcloud player
+ mobj = re.search(
+ r'<iframe src="(?P<url>https?://(?:w\.)?soundcloud\.com/player[^"]+)"',
+ webpage)
+ if mobj is not None:
+ url = unescapeHTML(mobj.group('url'))
+ return self.url_result(url)
+
# Start with something easy: JW Player in SWFObject
found = re.findall(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
if not found: