aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
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: