[facebook] redirect Mobile URLs to Desktop URLs
authorRemita Amine <remitamine@gmail.com>
Thu, 10 Dec 2020 14:19:43 +0000 (15:19 +0100)
committerRemita Amine <remitamine@gmail.com>
Thu, 10 Dec 2020 14:19:43 +0000 (15:19 +0100)
closes #24831
closes #25624

youtube_dl/extractor/facebook.py

index f1a90362f61ddd17a80aaf8fc55842e21f6361e3..27a57ad0307ae14315925ccf5d80bbcf019cef96 100644 (file)
@@ -306,7 +306,8 @@ class FacebookIE(InfoExtractor):
         self._login()
 
     def _extract_from_url(self, url, video_id, fatal_if_no_video=True):
-        webpage = self._download_webpage(url, video_id)
+        webpage = self._download_webpage(
+            url.replace('://m.facebook.com/', '://www.facebook.com/'), video_id)
 
         video_data = None