projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cb31d2
)
[facebook] Improve embed detection (#5701)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 3 Jul 2016 06:11:29 +0000
(14:11 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sun, 3 Jul 2016 06:11:29 +0000
(14:11 +0800)
youtube_dl/extractor/facebook.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/facebook.py
b/youtube_dl/extractor/facebook.py
index bbdb14366589d65c87d9a96080e22059300a3d99..f5d4f966a84f597f657d968aaa801971aed88f3e 100644
(file)
--- a/
youtube_dl/extractor/facebook.py
+++ b/
youtube_dl/extractor/facebook.py
@@
-139,7
+139,7
@@
class FacebookIE(InfoExtractor):
# Facebook API embed
# see https://developers.facebook.com/docs/plugins/embedded-video-player
mobj = re.search(r'''(?x)<div[^>]+
- class=(?P<q1>[\'"])[^\'"]*\bfb-
video
\b[^\'"]*(?P=q1)[^>]+
+ class=(?P<q1>[\'"])[^\'"]*\bfb-
(?:video|post)
\b[^\'"]*(?P=q1)[^>]+
data-href=(?P<q2>[\'"])(?P<url>(?:https?:)?//(?:www\.)?facebook.com/.+?)(?P=q2)''', webpage)
if mobj is not None:
return mobj.group('url')