aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-21 18:10:14 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-21 18:10:17 +0100
commit9834872bf63b4e03b66c5e3b8f306556e735d8c5 (patch)
tree816afd808b15a1944aff0e3753bd65c2f60f47a3 /youtube_dl/extractor/generic.py
parent94a23d2a1ed94af8bb80898194f03c38a5dcdb1d (diff)
[facebook] Add support for embeds
Example URL: http://www.hostblogger.de/blog/archives/6181-Auto-jagt-Betonmischer.html
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 3e96cb15f..91536075d 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -319,6 +319,12 @@ class GenericIE(InfoExtractor):
if mobj is not None:
return self.url_result(mobj.group('url'), 'Novamov')
+ # Look for embedded Facebook player
+ mobj = re.search(
+ r'<iframe[^>]+?src=(["\'])(?P<url>https://www.facebook.com/video/embed.+?)\1', webpage)
+ if mobj is not None:
+ return self.url_result(mobj.group('url'), 'Facebook')
+
# Start with something easy: JW Player in SWFObject
mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
if mobj is None: