question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot download video from facebook url

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dirkfcommented, Jan 8, 2022

I updated the patch above to add error-checking that should avoid the crash above, though that may not affect whether media are found.

1reaction
wankiocommented, Jan 8, 2022

imported cookies still not working, some public page still downloadable , but some just failed,

below is in private group

[facebook] 4743714749016405: Downloading webpage
Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "youtube_dl\__init__.pyc", line 475, in main
  File "youtube_dl\__init__.pyc", line 465, in _real_main
  File "youtube_dl\YoutubeDL.pyc", line 2068, in download
  File "youtube_dl\YoutubeDL.pyc", line 808, in extract_info
  File "youtube_dl\YoutubeDL.pyc", line 815, in wrapper
  File "youtube_dl\YoutubeDL.pyc", line 836, in __extract_info
  File "youtube_dl\extractor\common.pyc", line 534, in extract
  File "youtube_dl\extractor\facebook.pyc", line 680, in _real_extract
  File "youtube_dl\extractor\facebook.pyc", line 499, in _extract_from_url
  File "youtube_dl\extractor\facebook.pyc", line 480, in parse_attachment
AttributeError: 'NoneType' object has no attribute 'get'
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Download a Video from Facebook on Any Device
Open the Facebook app on your Android device. · Find the video you want to download. · Then tap the three-dot icon above...
Read more >
Why can't I download Facebook videos anymore the old way ...
For downloading videos from facebook you need to have browser on which facebook is running on playing the video you will get a...
Read more >
How to Download Facebook Videos (or Live Video) in 4 Steps
1. Go to the Facebook video you'd like to download · 2. Press 'CTRL + U' or right click anywhere on the video...
Read more >
[Solved] Facebook Download Video Not Working
Step 1 Login to your Facebook account and copy the link of the video you like to download. · Step 2 Then, launch...
Read more >
How to download videos from Facebook | Tom's Guide
1. In your desktop browser, go to the Facebook website (opens in new tab) and find the video you want to download. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found