1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-15 03:27:46 +01:00

[facebook] fix tahoe request for authenticated users(closes #16655)

This commit is contained in:
Remita Amine 2018-07-23 06:20:00 +01:00
parent d4e7065111
commit 631f93ee2d

View File

@ -355,7 +355,6 @@ class FacebookIE(InfoExtractor):
tahoe_data = self._download_webpage( tahoe_data = self._download_webpage(
self._VIDEO_PAGE_TAHOE_TEMPLATE % video_id, video_id, self._VIDEO_PAGE_TAHOE_TEMPLATE % video_id, video_id,
data=urlencode_postdata({ data=urlencode_postdata({
'__user': 0,
'__a': 1, '__a': 1,
'__pc': self._search_regex( '__pc': self._search_regex(
r'pkg_cohort["\']\s*:\s*["\'](.+?)["\']', webpage, r'pkg_cohort["\']\s*:\s*["\'](.+?)["\']', webpage,
@ -363,6 +362,9 @@ class FacebookIE(InfoExtractor):
'__rev': self._search_regex( '__rev': self._search_regex(
r'client_revision["\']\s*:\s*(\d+),', webpage, r'client_revision["\']\s*:\s*(\d+),', webpage,
'client revision', default='3944515'), 'client revision', default='3944515'),
'fb_dtsg': self._search_regex(
r'"DTSGInitialData"\s*,\s*\[\]\s*,\s*{\s*"token"\s*:\s*"([^"]+)"',
webpage, 'dtsg token', default=''),
}), }),
headers={ headers={
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',