mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-17 23:33:57 -05:00
[facebook] Add shortcut and reformat _VALID_URL
This commit is contained in:
parent
e9bd0f772b
commit
2e6e742c3c
1 changed files with 20 additions and 9 deletions
|
@ -23,15 +23,23 @@
|
||||||
|
|
||||||
class FacebookIE(InfoExtractor):
|
class FacebookIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://(?:\w+\.)?facebook\.com/
|
(?:
|
||||||
|
https?://
|
||||||
|
(?:\w+\.)?facebook\.com/
|
||||||
(?:[^#]*?\#!/)?
|
(?:[^#]*?\#!/)?
|
||||||
(?:
|
(?:
|
||||||
(?:video/video\.php|photo\.php|video\.php|video/embed)\?(?:.*?)
|
(?:
|
||||||
(?:v|video_id)=|
|
video/video\.php|
|
||||||
|
photo\.php|
|
||||||
|
video\.php|
|
||||||
|
video/embed
|
||||||
|
)\?(?:.*?)(?:v|video_id)=|
|
||||||
[^/]+/videos/(?:[^/]+/)?
|
[^/]+/videos/(?:[^/]+/)?
|
||||||
|
)|
|
||||||
|
facebook:
|
||||||
)
|
)
|
||||||
(?P<id>[0-9]+)
|
(?P<id>[0-9]+)
|
||||||
(?:.*)'''
|
'''
|
||||||
_LOGIN_URL = 'https://www.facebook.com/login.php?next=http%3A%2F%2Ffacebook.com%2Fhome.php&login_attempt=1'
|
_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'
|
_CHECKPOINT_URL = 'https://www.facebook.com/checkpoint/?next=http%3A%2F%2Ffacebook.com%2Fhome.php&_fb_noscript=1'
|
||||||
_NETRC_MACHINE = 'facebook'
|
_NETRC_MACHINE = 'facebook'
|
||||||
|
@ -66,6 +74,9 @@ class FacebookIE(InfoExtractor):
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.facebook.com/ChristyClarkForBC/videos/vb.22819070941/10153870694020942/?type=2&theater',
|
'url': 'https://www.facebook.com/ChristyClarkForBC/videos/vb.22819070941/10153870694020942/?type=2&theater',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'facebook:544765982287235',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _login(self):
|
def _login(self):
|
||||||
|
|
Loading…
Reference in a new issue