youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 38588ab9770813cb92013b870edc15def4f9ac1c
parent 85bcdd081ce0009bcb7135d8d68192d34969e168
Author: Yen Chi Hsuan <yan12125@gmail.com>
Date:   Fri,  7 Oct 2016 20:04:49 +0800

[facebook] Fix for new handleServerJS syntax (closes #10846)

According to the dump file in #10846, handleServerJS() now accepts
an optional second argument. It's a string from available dump files.

Diffstat:
MChangeLog | 1+
Myoutube_dl/extractor/facebook.py | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,7 @@ version <unreleased> Extractors +* [facebook] Fix video extraction (#10846) + [commonprotocols] Support direct MMS links (#10838) diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py @@ -258,7 +258,7 @@ class FacebookIE(InfoExtractor): if not video_data: server_js_data = self._parse_json(self._search_regex( - r'handleServerJS\(({.+})\);', webpage, 'server js data', default='{}'), video_id) + r'handleServerJS\(({.+})(?:\);|,")', webpage, 'server js data', default='{}'), video_id) for item in server_js_data.get('instances', []): if item[1][0] == 'VideoConfig': video_data = video_data_list2dict(item[2][0]['videoData'])