diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-25 22:15:21 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-25 22:15:21 +0600 |
commit | 2e6e742c3cda5ed4846bff4ef894aac21434e3d4 (patch) | |
tree | 4f357841afafc2b2b3f4d2d75118e809bbe73958 /youtube_dl/extractor/facebook.py | |
parent | e9bd0f772b28176e86cfe8c641b6281a96be2ee4 (diff) |
[facebook] Add shortcut and reformat _VALID_URL
Diffstat (limited to 'youtube_dl/extractor/facebook.py')
-rw-r--r-- | youtube_dl/extractor/facebook.py | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index ec699ba54..f9fd8ed4e 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -23,15 +23,23 @@ from ..utils import ( class FacebookIE(InfoExtractor): _VALID_URL = r'''(?x) - https?://(?:\w+\.)?facebook\.com/ - (?:[^#]*?\#!/)? - (?: - (?:video/video\.php|photo\.php|video\.php|video/embed)\?(?:.*?) - (?:v|video_id)=| - [^/]+/videos/(?:[^/]+/)? - ) - (?P<id>[0-9]+) - (?:.*)''' + (?: + https?:// + (?:\w+\.)?facebook\.com/ + (?:[^#]*?\#!/)? + (?: + (?: + video/video\.php| + photo\.php| + video\.php| + video/embed + )\?(?:.*?)(?:v|video_id)=| + [^/]+/videos/(?:[^/]+/)? + )| + facebook: + ) + (?P<id>[0-9]+) + ''' _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' _NETRC_MACHINE = 'facebook' @@ -66,6 +74,9 @@ class FacebookIE(InfoExtractor): }, { 'url': 'https://www.facebook.com/ChristyClarkForBC/videos/vb.22819070941/10153870694020942/?type=2&theater', 'only_matching': True, + }, { + 'url': 'facebook:544765982287235', + 'only_matching': True, }] def _login(self): |