From ed06b54607d330bfcba1174cb0118a11e2cc1e5d Mon Sep 17 00:00:00 2001 From: hodayabu <44240078+hodayabu@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:53:43 +0300 Subject: [PATCH] fix facebook thumbnail (#340) Co-authored-by: bhodaya --- youtube_dl/extractor/facebook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index eba2edfef..ea93173ce 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -791,7 +791,8 @@ class FacebookIE(InfoExtractor): def _resolve_thumbnail(self, webpage, tahoe_data): thumbnail = self._html_search_meta(['og:image', 'twitter:image'], webpage) if not thumbnail: - thumbnail = self._search_regex(r'"subtitles_src":"(.+?")', tahoe_data.primary, 'thumbnail', fatal=False) + thumbnail = self._search_regex(r'"thumbSrc":"(.+?)"', tahoe_data.secondary, 'thumbnail', fatal=False) + thumbnail = str(thumbnail).replace('\\', "") return thumbnail def _valid_video_title(self, video_title):