[pinterest] match board URLs with query strings (#7805)

This commit is contained in:
Mike Fährmann
2025-07-11 18:55:21 +02:00
parent e68dc960c2
commit 8e40ea2fe2
2 changed files with 7 additions and 1 deletions

View File

@@ -231,7 +231,7 @@ class PinterestBoardExtractor(PinterestExtractor):
directory_fmt = ("{category}", "{board[owner][username]}", "{board[name]}")
archive_fmt = "{board[id]}_{id}"
pattern = (BASE_PATTERN + r"/(?!pin/)([^/?#]+)"
"/(?!_saved|_created|pins/)([^/?#]+)/?$")
r"/(?!_saved|_created|pins/)([^/?#]+)/?(?:$|\?|#)")
example = "https://www.pinterest.com/USER/BOARD/"
def __init__(self, match):

View File

@@ -147,6 +147,12 @@ __tests__ = (
"#class" : pinterest.PinterestBoardExtractor,
},
{
"#url" : "https://ru.pinterest.com/tarvenck/%D0%B0%D1%82%D0%BC%D0%BE%D1%81%D1%84%D0%B5%D1%80%D0%BD%D1%8B%D0%B5/?invite_code=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&sender=1111111111111111111",
"#comment" : "board URL with query string (#7805)",
"#class" : pinterest.PinterestBoardExtractor,
},
{
"#url" : "https://www.pinterest.com/g1952849/",
"#category": ("", "pinterest", "user"),