yt-dlp: Facebook: Cannot parse data (ALL links affected)

Checklist

Region

Slovakia

Provide a description that is worded well enough to be understood

I tried several fb video urls, all with the same result Cannot parse data; please report this issue Worked fine not that long ago.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

yt-dlp.exe -vU https://www.facebook.com/100044498826847/videos/31920791
0501223
[debug] Command-line config: ['-vU', 'https://www.facebook.com/100044498826847/v
ideos/319207910501223']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8 (No VT), erro
r utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-7-6.1.7601-SP1 (OpenSSL 1.
1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-fu
ll_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.05.07,
 mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releas
es/latest
Available version: stable@2023.07.06, Current version: stable@2023.07.06
Current Build Hash: 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb3
52aa
yt-dlp is up to date (stable@2023.07.06)
[facebook] Extracting URL: https://www.facebook.com/100044498826847/videos/31920
7910501223
[facebook] 319207910501223: Downloading webpage
[facebook] 319207910501223: Downloading webpage
ERROR: [facebook] 319207910501223: Cannot parse data; please report this issue o
n  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issu
e template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 710, in extract
  File "yt_dlp\extractor\facebook.py", line 707, in _real_extract
  File "yt_dlp\extractor\facebook.py", line 654, in _extract_from_url

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 8
  • Comments: 33 (4 by maintainers)

Commits related to this issue

Most upvoted comments

OK. but for Windows users, there is only a single yt-dlp.EXE file, so for Windows users we are out of luck

Any way to use this code on Windows?

yt-dlp --update-to nightly

Then why does it work for me and others without copying that folder from the fork into yt-dlp’s source

They are likely working from 2023.07.06 source instead of master. In which case, NO, do NOT do any of this mixing and matching of source code files. You will end up with a broken yt-dlp

You need to start from master

Or even better, git clone the PR author’s fork and git checkout the PR branch

The PR will be merged soon, so I would advise just sitting tight for a little while

thank you @ringus1 I pasted your code and it worked

You can not solve the error with reinstall or update yt-dlp because the corrected file of facebook.py is not yet merged with the official version of yt-dlp. So you must add the file manually to your yt-dlp.

Go to the path where you installed yt-dlp and delete the facebook.py file in the extractor folder and then download the facebook.py file from “https://github.com/ringus1/yt-dlp/tree/fix_facebook_extractor/yt_dlp/extractor” and put it in place of the file you deleted.

OK. but for Windows users, there is only a single yt-dlp.EXE file, so for Windows users we are out of luck.😐

I unziped yt-dlp_win.zip and replaced facebook.py with https://github.com/ringus1/yt-dlp/blob/fix_facebook_extractor/yt_dlp/extractor/facebook.py but I still get the parser error.

OK. but for Windows users, there is only a single yt-dlp.EXE file, so for Windows users we are out of luck.😐

After changing the facebook.py file, you can create your own yt-dlp.exe: https://github.com/yt-dlp/yt-dlp#compile

If not, you can use the following site to download Facebook videos until yt-dlp is updated:

Windows users have Linux subsystem (Ubuntu) but not having knowledge to extract and patch the yt-dlp zip file.

Any way to use this code on Windows?

I have the same issue

~/app# yt-dlp -U https://fb.watch/mw_kG01xBj/?mibextid=HSR2mg Available version: stable@2023.07.06, Current version: stable@2023.07.06 yt-dlp is up to date (stable@2023.07.06) [generic] Extracting URL: https://fb.watch/mw_kG01xBj/?mibextid=HSR2mg [generic] ?mibextid=HSR2mg: Downloading webpage [redirect] Following redirect to https://www.facebook.com/DivaPatang/videos/1302595173728654/?extid=CL-UNK-UNK-UNK-AN_GK0T-GK1C&mibextid=HSR2mg&ref=sharing [facebook] Extracting URL: https://www.facebook.com/DivaPatang/videos/1302595173728654/?extid=CL-UNK-UNK-UNK-AN_GK0T-GK1C&mi...d=HSR2mg&ref=sharing [facebook] 1302595173728654: Downloading webpage [facebook] 1302595173728654: Downloading webpage ERROR: [facebook] 1302595173728654: Cannot parse data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U