feat(downloads): a Facebook group post downloads its own video, or says it has none
Given a group post's link, yt-dlp either found no formats or took another video from the page's feed data, so a "successful" retry of such a post was a wrong download. With the user's cookie the Facebook adapter now reads the post page, takes the single video node in the script blocks that carry the post id, and downloads that video's watch link (the Chrome retry does the rest). No single video in the post fails with its own message and the group-post copy, reworded to say the post has no video; the post link is never handed to yt-dlp as a fallback. Without a cookie nothing changes.
This commit is contained in:
@@ -113,6 +113,18 @@ def test_a_facebook_group_post_without_formats_names_the_link():
|
||||
)
|
||||
|
||||
|
||||
def test_our_post_without_a_video_verdict_names_the_group_link():
|
||||
# The worker's own text when the post page holds no single video (S4): the message and its rule and
|
||||
# catalog entry are pinned together, or an edit to the wording orphans the copy.
|
||||
msg = dlerrors.POST_WITHOUT_VIDEO_MESSAGE
|
||||
assert classify(msg) == "format_unavailable"
|
||||
assert dlerrors.diagnose(msg, url=_GROUP_POST, cookie_attached=True) == (
|
||||
"format_unavailable",
|
||||
"facebook.group_post_video",
|
||||
)
|
||||
assert dlerrors.diagnose(msg, url=_REEL, cookie_attached=True) == ("format_unavailable", None)
|
||||
|
||||
|
||||
def test_a_catalog_entry_never_leaves_its_host():
|
||||
# "Cannot parse data" is yt-dlp's wording for a broken extractor on every site.
|
||||
other = _FB_PARSE.replace("[facebook]", "[vimeo]")
|
||||
|
||||
Reference in New Issue
Block a user