Open wanchihh opened 8 years ago
This also does not work: https://www.facebook.com/groups/ateistiskselskab/permalink/10154930137678856/
It thinks you need to log in - which is clearly not true.
@ole-tange That's a different bug. Could you open a new issue?
Is this the same as mine problem?
fun~$ youtube-dl --verbose 'https://www.facebook.com/reel/1463302304499951'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.facebook.com/reel/1463302304499951']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.11.3 (CPython) - Linux-6.3.9-1-default-x86_64-with-glibc2.37
[debug] exe versions: ffmpeg 6.0, ffprobe 6.0
[debug] Proxy map: {}
[generic] 1463302304499951: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 1463302304499951: Downloading webpage
[generic] 1463302304499951: Extracting information
[generic] 1463302304499951: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 1463302304499951: Downloading webpage
[generic] 1463302304499951: Extracting information
[redirect] Following redirect to https://www.facebook.com/plugins/video.php?height=1920&width=1080&href=%2F100013522218132%2Fvideos%2Fmassive-us-aircraft-carrier-in-waters-of-split-croatia-with-70-planes-that-can-r%2F1463302304499951%2F&_fb_noscript=1
[generic] video: Requesting header
WARNING: Falling back on generic information extractor.
[generic] video: Downloading webpage
[generic] video: Extracting information
ERROR: Unsupported URL: https://www.facebook.com/plugins/video.php?height=1920&width=1080&href=%2F100013522218132%2Fvideos%2Fmassive-us-aircraft-carrier-in-waters-of-split-croatia-with-70-planes-that-can-r%2F1463302304499951%2F&_fb_noscript=1
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
ie_result = ie.extract(url)
^^^^^^^^^^^^^^^
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
ie_result = self._real_extract(url)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/youtube-dl/youtube_dl/extractor/generic.py", line 3489, in _real_extract
raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.facebook.com/plugins/video.php?height=1920&width=1080&href=%2F100013522218132%2Fvideos%2Fmassive-us-aircraft-carrier-in-waters-of-split-croatia-with-70-planes-that-can-r%2F1463302304499951%2F&_fb_noscript=1
fun~$
It's certainly similar. yt-dlp gets the /reel/ page without redirecting, so a back-port could help.
Instead, we can let the redirect work and fix (up to a point) the FacebookPluginsVideoIE
for the URL patterns here:
correctly redirect to both FB and external URLs
--- a/youtube_dl/extractor/facebook.py
+++ b/youtube_dl/extractor/facebook.py
@@ -681,7 +681,7 @@ class FacebookIE(InfoExtractor):
class FacebookPluginsVideoIE(InfoExtractor):
- _VALID_URL = r'https?://(?:[\w-]+\.)?facebook\.com/plugins/video\.php\?.*?\bhref=(?P<id>https.+)'
+ _VALID_URL = r'(?s)https?://(?:[\w-]+\.)?facebook\.com/(?:v[\d.]+/)?plugins/video\.php\?(?:.*?&)?href=(?P<id>(?:http|%2[fF]|/).+?)(?:$|&)'
_TESTS = [{
'url': 'https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fgov.sg%2Fvideos%2F10154383743583686%2F&show_text=0&width=560',
@@ -704,6 +704,5 @@ class FacebookPluginsVideoIE(InfoExtractor):
}]
def _real_extract(self, url):
- return self.url_result(
- compat_urllib_parse_unquote(self._match_id(url)),
- FacebookIE.ie_key())
+ return self.url_result(urljoin(
+ 'https://www.facebook.com', compat_urllib_parse_unquote(self._match_id(url))))
The external site has to be supported, unlike www.mycarforum.com in the original problem URLs.
Then:
$ python -m youtube_dl -v -F 'https://www.facebook.com/reel/1463302304499951'[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.facebook.com/reel/1463302304499951']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 87c77a0b0
[debug] Python 2.7.18 (CPython i686 32bit) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial - OpenSSL 1.1.1t 7 Feb 2023 - glibc 2.15
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[generic] 1463302304499951: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 1463302304499951: Downloading webpage
[generic] 1463302304499951: Extracting information
[facebook] 1463302304499951: Downloading webpage
WARNING: Unknown codec vp09.00.30.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.30.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.31.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.31.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.31.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.31.08.00.01.01.01.00
WARNING: Unknown codec vp09.00.40.08.00.01.01.01.00
[download] Downloading playlist: 1463302304499951
[facebook] playlist 1463302304499951: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[info] Available formats for 1463302304499951:
format code extension resolution note
1129638768438872a m4a audio only DASH audio 79k , m4a_dash container, mp4a.40.5 (44100Hz)
185997627502804v mp4 580x1032 DASH video 124k , mp4_dash container, av01.0.09M.08, video only
923349152097085v mp4 720x1280 DASH video 370k , mp4_dash container, av01.0.09M.08, video only
990139268842798v mp4 720x1280 DASH video 878k , mp4_dash container, av01.0.09M.08, video only
147789984937182v mp4 720x1280 DASH video 1807k , mp4_dash container, av01.0.09M.08, video only
718304283463765v mp4 720x1280 DASH video 3383k , mp4_dash container, av01.0.09M.08, video only
7117972781550284v mp4 1080x1920 DASH video 4300k , mp4_dash container, av01.0.09M.08, video only
1208605577206543v mp4 384x682 DASH video 98k , mp4_dash container
1682239612250282v mp4 556x988 DASH video 208k , mp4_dash container
3646292515656183v mp4 720x1280 DASH video 533k , mp4_dash container
809403937361013v mp4 720x1280 DASH video 1331k , mp4_dash container
599380479046409v mp4 720x1280 DASH video 2732k , mp4_dash container
829015408555345v mp4 720x1280 DASH video 4627k , mp4_dash container
1636173010182348v mp4 1080x1920 DASH video 6113k , mp4_dash container
sd mp4 unknown
hd mp4 unknown (best)
[download] Finished downloading playlist: 1463302304499951
$
@dirkf Thank you, that really makes youtube-dl working for me again! Passed it to the openSUSE package.
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2016.09.27. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add
-v
flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
Hi,
When I tried downloading videos from the Facebook urls beginning with "https://www.facebook.com/v2.3/plugins/video.php", the Unsupported URL error is returned.
Eg.:
Note the youtube-dl is able to download videos from Facebook urls beginning with "https://www.facebook.com/plugins/video.php"
Thanks.