-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some Facebook plugin URLs are unsupported #10795
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Is this the same as mine problem?
|
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
--- 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.
The text was updated successfully, but these errors were encountered: