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] There is a problem when using the URL of post with YoutubeDL() extractor #25562

Closed
GetPHP-IR opened this issue Jun 6, 2020 · 0 comments

Comments

@GetPHP-IR
Copy link

@GetPHP-IR GetPHP-IR commented Jun 6, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.06.06
  • 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] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.06
[debug] Python version 3.7.7 (CPython) - Linux-4.15.0-101-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {'http': 'https://*******', 'https': 'https://******'}
[facebook] 164667721736752: Downloading webpage
ERROR: 164667721736752: Failed to parse JSON  (caused by JSONDecodeError("Expecting ',' delimiter: line 1 column 21 (char 20)")); 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 "/***/***/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
    return json.loads(json_string)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 21 (char 20)
Traceback (most recent call last):
  File "/*****/****/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 899, in _parse_json
    return json.loads(json_string)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 21 (char 20)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/*****/*****/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/*****/*****/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/*****/*****/lib/python3.7/site-packages/youtube_dl/extractor/facebook.py", line 475, in _real_extract
    video_id)]
  File "/*****/*****/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 903, in _parse_json
    raise ExtractorError(errmsg, cause=ve)
youtube_dl.utils.ExtractorError: 164667721736752: Failed to parse JSON  (caused by JSONDecodeError("Expecting ',' delimiter: line 1 column 21 (char 20)")); 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.

Description

Hi
When i use youtube-dl embed code method to download the video (like this url) "https://www.facebook.com/105776530959205/posts/164667721736752/" in info extractor this error occurred

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
            info_dict = ydl.extract_info(url, download=False)    

There is no problem with FB video URLs (like this one): "https://www.facebook.com/imdb/videos/241414897068881/"

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.