Skip to content

Commit

Permalink
merge #6548: [facebook] add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 28, 2024
2 parents 5cc9ca7 + 0e1d93d commit 9e7d7a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/extractor/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class FacebookProfileExtractor(FacebookExtractor):
BASE_PATTERN +
r"/(?!media/|photo/|photo.php|watch/)"
r"(?:profile\.php\?id=|people/[^/?#]+/)?"
r"([^/?&#]+)(?:/photos|/videos|/posts)?/?(?:$|\?|#)"
r"([^/?&#]+)(?:/photos(?:_by)?|/videos|/posts)?/?(?:$|\?|#)"
)
example = "https://www.facebook.com/USERNAME"

Expand Down
12 changes: 12 additions & 0 deletions test/results/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
"#class" : facebook.FacebookProfileExtractor,
},

{
"#url" : "https://www.facebook.com/facebook/photos_by",
"#category": ("", "facebook", "profile"),
"#class" : facebook.FacebookProfileExtractor,
},

{
"#url" : "https://www.facebook.com/people/facebook/100064860875397/?sk=photos",
"#category": ("", "facebook", "profile"),
"#class" : facebook.FacebookProfileExtractor,
},

{
"#url" : "https://www.facebook.com/profile.php?id=100064860875397",
"#category": ("", "facebook", "profile"),
Expand Down

0 comments on commit 9e7d7a3

Please sign in to comment.