1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 06:57:17 +08:00

Fix for issue #19020

This commit is contained in:
Aditya Nath 2019-02-01 14:00:04 -05:00
parent 49fe4175ae
commit 9a429793bd

View File

@ -39,15 +39,16 @@ class FacebookIE(InfoExtractor):
photo\.php|
video\.php|
video/embed|
story\.php
)\?(?:.*?)(?:v|video_id|story_fbid)=|
story\.php|
flx/warn/
)\?(?:.*?)(?:u|v|video_id|story_fbid)=|
[^/]+/videos/(?:[^/]+/)?|
[^/]+/posts/|
groups/[^/]+/permalink/
)|
facebook:
)
(?P<id>[0-9]+)
(?P<id>[0-9]+|https://.*)
'''
_LOGIN_URL = 'https://www.facebook.com/login.php?next=http%3A%2F%2Ffacebook.com%2Fhome.php&login_attempt=1'
_CHECKPOINT_URL = 'https://www.facebook.com/checkpoint/?next=http%3A%2F%2Ffacebook.com%2Fhome.php&_fb_noscript=1'
@ -455,6 +456,13 @@ class FacebookIE(InfoExtractor):
if info_dict:
return info_dict
# In case the url is a redirect and contains an external link.
if video_id.startswith("https://"):
return {
'_type': 'url',
'url': video_id,
}
if '/posts/' in url:
entries = [
self.url_result('facebook:%s' % vid, FacebookIE.ie_key())