Giter Site home page Giter Site logo

Comments (6)

bashonly avatar bashonly commented on July 19, 2024 1

this seems to fix it:

diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py
index 834b1df18..b76407a5c 100644
--- a/yt_dlp/extractor/facebook.py
+++ b/yt_dlp/extractor/facebook.py
@@ -560,7 +560,7 @@ def extract_from_jsmods_instances(js_data):
                     js_data, lambda x: x['jsmods']['instances'], list) or [])
 
         def extract_dash_manifest(video, formats):
-            dash_manifest = video.get('dash_manifest')
+            dash_manifest = traverse_obj(video, 'dash_manifest', 'playlist', expected_type=str)
             if dash_manifest:
                 formats.extend(self._parse_mpd_formats(
                     compat_etree_fromstring(urllib.parse.unquote_plus(dash_manifest)),
$ yt-dlp -F https://facebook.com/475841587884690/videos/744372871141776
[facebook] Extracting URL: https://facebook.com/475841587884690/videos/744372871141776
[facebook] 744372871141776: Downloading webpage
[info] Available formats for 744372871141776:
ID                EXT RESOLUTION │   FILESIZE  TBR PROTO │ VCODEC       VBR ACODEC     ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
2890193591132187a m4a audio only │ ~ 10.64MiB  65k https │ audio only       mp4a.40.5  65k 48k DASH audio, m4a_dash
sd                mp4 unknown    │                 https │ unknown          unknown
308764358916363v  mp4 256x144    │ ~ 10.46MiB  64k https │ avc1.4D400C  64k video only         DASH video, mp4_dash
454016937233089v  mp4 426x240    │ ~ 23.25MiB 142k https │ avc1.4D4015 142k video only         DASH video, mp4_dash
7151401058299907v mp4 640x360    │ ~ 40.43MiB 248k https │ avc1.4D401E 248k video only         DASH video, mp4_dash
442595941470298v  mp4 854x480    │ ~ 65.56MiB 402k https │ avc1.4D401F 402k video only         DASH video, mp4_dash
448319621059078v  mp4 1280x720   │ ~111.09MiB 681k https │ avc1.4D4020 681k video only         DASH video, mp4_dash

from yt-dlp.

elpresti avatar elpresti commented on July 19, 2024 1

hello @bashonly , thanks for your fast reply and for your fix, but I'm not very familiar with Python, neither with the yt-dlp workflow. Is there anything I can do to apply your patch or it will be released soon in some specific version of yp-dlp?
Thanks. Regards

from yt-dlp.

shortringbear avatar shortringbear commented on July 19, 2024 1

this seems to fix it:

diff --git a/yt_dlp/extractor/facebook.py b/yt_dlp/extractor/facebook.py
index 834b1df18..b76407a5c 100644
--- a/yt_dlp/extractor/facebook.py
+++ b/yt_dlp/extractor/facebook.py
@@ -560,7 +560,7 @@ def extract_from_jsmods_instances(js_data):
                     js_data, lambda x: x['jsmods']['instances'], list) or [])
 
         def extract_dash_manifest(video, formats):
-            dash_manifest = video.get('dash_manifest')
+            dash_manifest = traverse_obj(video, 'dash_manifest', 'playlist', expected_type=str)
             if dash_manifest:
                 formats.extend(self._parse_mpd_formats(
                     compat_etree_fromstring(urllib.parse.unquote_plus(dash_manifest)),

I'm also very interested in this fix, but I don't understand where I need to insert this code snippet to make it work.

from yt-dlp.

bashonly avatar bashonly commented on July 19, 2024 1

@elpresti yt-dlp --update-to master

from yt-dlp.

BahzBeih avatar BahzBeih commented on July 19, 2024

i have the same problem too.

from yt-dlp.

elpresti avatar elpresti commented on July 19, 2024

Thanks a lot @bashonly , your fix works like a charm in the last version!

from yt-dlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.