Skip to content
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

[Facebook] Unsupported URL /watch… #27062

Closed
3 tasks done
James-E-A opened this issue Nov 18, 2020 · 9 comments
Closed
3 tasks done

[Facebook] Unsupported URL /watch… #27062

James-E-A opened this issue Nov 18, 2020 · 9 comments

Comments

@James-E-A
Copy link

Checklist

  • I'm reporting a site feature request
  • I've verified that I'm running youtube-dl version 2020.11.18
  • I've searched the bugtracker for similar site feature requests including closed ones

Description

Some videos are transitioning to the /watch endpoint, from the normal /video one. Youtube-DL seems to be choking on these.

Could you add support for the new watch video endpoint?


The example post is https://www.facebook.com/infopico/posts/3397748700260707

If you hit Facebook's "Copy Link To Video" UI element, it reveals the true URL:
https://www.facebook.com/watch/?v=647537299265662https://fb.watch/1QaAHN0SGl/

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://fb.watch/1QaAHN0SGl/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.11.18
[debug] Python version 3.8.6 (CPython) - Linux-5.8.18-200.fc32.x86_64-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[generic] 1QaAHN0SGl: Requesting header
[redirect] Following redirect to https://www.facebook.com/watch/?v=647537299265662
[generic] ?v=647537299265662: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?v=647537299265662: Downloading webpage
[generic] ?v=647537299265662: Extracting information
[redirect] Following redirect to https://www.facebook.com/watch/?v=647537299265662&_fb_noscript=1
[generic] ?v=647537299265662&_fb_noscript=1: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?v=647537299265662&_fb_noscript=1: Downloading webpage
[generic] ?v=647537299265662&_fb_noscript=1: Extracting information
ERROR: Unsupported URL: https://www.facebook.com/watch/?v=647537299265662&_fb_noscript=1
Traceback (most recent call last):
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/generic.py", line 3382, in _real_extract
    raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.facebook.com/watch/?v=647537299265662&_fb_noscript=1
@James-E-A
Copy link
Author

Referencing the post directly yields even worse results (see the following error), though this is more of a QoL fix / a sub-issue of that described in the OP:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.facebook.com/infopico/posts/3397748700260707']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.11.18
[debug] Python version 3.8.6 (CPython) - Linux-5.8.18-200.fc32.x86_64-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[facebook] 3397748700260707: Downloading webpage
ERROR: Unable to extract single video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 479, in _real_extract
    video_id = self._search_regex(r'video_id:\s*"([0-9]+)"', webpage, 'single video id')
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 1010, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract single video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@AVerm
Copy link

AVerm commented Nov 18, 2020

As a workaround for now, I noticed that the "m." subdomain worked for me on a few videos

@october262
Copy link

october262 commented Nov 18, 2020

A WORKAROUND !! > play the video and click the enlarge button, copy link in top search bar
and try youtube-dl --force-generic-extractor video link

does not work on this link yet - https://www.facebook.com/infopico/posts/3397748700260707

@vctls
Copy link

vctls commented Nov 20, 2020

As a workaround for now, I noticed that the "m." subdomain worked for me on a few videos

On the .m subdomain it's actually pretty easy to get the .mp4 link from the DOM, but AFAIK you only get the lowest resolution.

A WORKAROUND !! > play the video and click the enlarge button, copy link in top search bar
and try youtube-dl --force-generic-extractor video link

does not work on this link yet - https://www.facebook.com/infopico/posts/3397748700260707

What endpoints does it work on? What do your URLs look like?

@James-E-A
Copy link
Author

play the video and click the enlarge button, copy link in top search bar and try youtube-dl --force-generic-extractor video link

Interestingly, this did not work for me in the example video from the OP:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.facebook.com/infopico/videos/647537299265662/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.11.18
[debug] Python version 3.8.6 (CPython) - Linux-5.8.18-200.fc32.x86_64-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[facebook] 647537299265662: Downloading webpage
[facebook] 647537299265662: Downloading webpage
[facebook] 647537299265662: Downloading webpage
ERROR: Cannot parse data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 482, in _real_extract
    _, info_dict = self._extract_from_url(
  File "/home/sweg/.local/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 380, in _extract_from_url
    raise ExtractorError('Cannot parse data')
youtube_dl.utils.ExtractorError: Cannot parse data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@moisespr123
Copy link

Not sure if this is related but some videos can only seem to be watchable on mobile and opening that same URL on desktop says the link is broken... Weird, but I also got the above issue when attempting to download.

@krem
Copy link

krem commented Dec 2, 2020

For me this url https://www.facebook.com/infopico/posts/3397748700260707 just is not accessible for not-logged-in session, how can ytdl download it?

@omnicentrist
Copy link

Same errors as everyone else, even with all of the workarounds on this link.

https://www.facebook.com/arigameplays/videos/2724338047804952/

@october262
Copy link

october262 commented Dec 3, 2020

For me this url https://www.facebook.com/infopico/posts/3397748700260707 just is not accessible for not-logged-in session, how can ytdl download it?

a workaround !!! - first copy the URL and open a new tab, paste in the URL and change www to mbasic. now press enter on your keyboard and the page will reload to the mobile interface, from there just play the video and it will open in another new tab, just right click and select save video as and you can download the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants