[facebook:set] fix/improve 'user_id' extraction (#7848)
https://github.com/mikf/gallery-dl/issues/7848#issuecomment-3181428631
This commit is contained in:
@@ -80,6 +80,8 @@ class FacebookExtractor(Extractor):
|
||||
directory["user_id"] = (
|
||||
text.extr(
|
||||
set_page, '"actors":[{"__typename":"User","id":"', '"') or
|
||||
text.extr(
|
||||
set_page, '"userID":"', '"') or
|
||||
directory["set_id"].split(".")[1])
|
||||
|
||||
return directory
|
||||
|
||||
@@ -143,6 +143,22 @@ __tests__ = (
|
||||
"#count" : 4,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.facebook.com/media/set/?set=a.127331797422780&type=3",
|
||||
"#comment" : "pfbid user ID; 'This content isn't available right now' profile",
|
||||
"#class" : facebook.FacebookSetExtractor,
|
||||
"#metadata": "post",
|
||||
"#range" : 0,
|
||||
|
||||
"caption" : "Amarte es mi hábito favorito",
|
||||
"date" : "dt:2025-05-03 03:42:52",
|
||||
"set_id" : "a.127331797422780",
|
||||
"title" : "Profile pictures",
|
||||
"user_id" : "100004378810826",
|
||||
"user_pfbid": r"re:pfbid\w{64}",
|
||||
"username" : "Angel Nava Santiago",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.facebook.com/photo.php?fbid=10165113568399554&set=t.100064860875397&type=3",
|
||||
"#class" : facebook.FacebookPhotoExtractor,
|
||||
|
||||
Reference in New Issue
Block a user