diff options
author | Sergey M. <dstftw@gmail.com> | 2015-08-03 05:43:01 +0600 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-08-03 05:43:01 +0600 |
commit | 2a04d2c799153778b4652a701e83f1d6d211fbf1 (patch) | |
tree | b2cc8825b8c02e2fa4f3ec90b80d2217617d8d41 /youtube_dl | |
parent | 8de922724b8f3ad31ff7249799de371ff8a5c3ad (diff) | |
parent | 67b8a28a2f69764259cf2e90c0a3785c05c55551 (diff) |
Merge pull request #6439 from remitamine/facebook
[facebook] extract uploader
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/facebook.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index e17bb9aea..178a7ca4c 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -17,6 +17,8 @@ from ..utils import ( int_or_none, limit_length, urlencode_postdata, + get_element_by_id, + clean_html, ) @@ -42,6 +44,7 @@ class FacebookIE(InfoExtractor): 'id': '637842556329505', 'ext': 'mp4', 'title': 're:Did you know Kei Nishikori is the first Asian man to ever reach a Grand Slam', + 'uploader': 'Tennis on Facebook', } }, { 'note': 'Video without discernible title', @@ -50,6 +53,7 @@ class FacebookIE(InfoExtractor): 'id': '274175099429670', 'ext': 'mp4', 'title': 'Facebook video #274175099429670', + 'uploader': 'Asif Nawab Butt', }, 'expected_warnings': [ 'title' @@ -161,6 +165,7 @@ class FacebookIE(InfoExtractor): video_title = limit_length(video_title, 80) if not video_title: video_title = 'Facebook video #%s' % video_id + uploader = clean_html(get_element_by_id('fbPhotoPageAuthorName', webpage)) return { 'id': video_id, @@ -168,4 +173,5 @@ class FacebookIE(InfoExtractor): 'formats': formats, 'duration': int_or_none(video_data.get('video_duration')), 'thumbnail': video_data.get('thumbnail_src'), + 'uploader': uploader, } |