youtube-dl: cannot download video from facebook url
Checklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.12.17
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--username', 'PRIVATE', '--password', 'PRIVATE', '-F', 'https://www.facebook.com/groups/352666925484718/permalink/1112505706167499/']
[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.8.10 (CPython) - Linux-5.4.0-91-generic-x86_64-with-glibc2.29
[debug] exe versions: none
[debug] Proxy map: {}
[facebook] Downloading login page
[facebook] Logging in
[facebook] 1112505706167499: Downloading webpage
Traceback (most recent call last):
File "/home/videodl/vdl/vdl_env/bin/youtube-dl", line 8, in <module>
sys.exit(main())
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/__init__.py", line 475, in main
_real_main(argv)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/__init__.py", line 465, in _real_main
retcode = ydl.download(all_urls)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 2068, in download
res = self.extract_info(
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 808, in extract_info
return self.__extract_info(url, ie, download, extra_info, process)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
return func(self, *args, **kwargs)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
ie_result = ie.extract(url)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 534, in extract
ie_result = self._real_extract(url)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 680, in _real_extract
return self._extract_from_url(real_url, video_id)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 499, in _extract_from_url
parse_attachment(attachment)
File "/home/videodl/vdl/vdl_env/lib/python3.8/site-packages/youtube_dl/extractor/facebook.py", line 480, in parse_attachment
media = attachment.get(key) or {}
AttributeError: 'NoneType' object has no attribute 'get'
Description
Youtube-dl was working with the same url, username and password. It stopped working recently. video url given in verbose.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (6 by maintainers)
I updated the patch above to add error-checking that should avoid the crash above, though that may not affect whether media are found.
imported cookies still not working, some public page still downloadable , but some just failed,
below is in private group
Thanx @dirkf it worked.
The Facebook extractor is pretty complicated and I have no idea which extraction technique stopped working.
However this patch gets a video from the problem page without any authentication data (updated with further error checking):
Ideally, that would be the desired target video in the problem log: I hope it is.
The unpatched extractor fails in the same way as #30473 when no authentication data is passed.