From 02a441503a762400fe6f3fee52db6c3711bcfff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 16 Oct 2016 12:00:43 +0200 Subject: [PATCH] [pinterest] adjust regex pattern --- gallery_dl/extractor/pinterest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/pinterest.py b/gallery_dl/extractor/pinterest.py index 43d325e2..f7d51b37 100644 --- a/gallery_dl/extractor/pinterest.py +++ b/gallery_dl/extractor/pinterest.py @@ -37,7 +37,7 @@ class PinterestExtractor(Extractor): class PinterestPinExtractor(PinterestExtractor): """Extractor for images from a single pin from pinterest.com""" subcategory = "pin" - pattern = [r"(?:https?://)?(?:www\.)?pinterest\.com/pin/([^/]+)"] + pattern = [r"(?:https?://)?(?:[^./]+\.)?pinterest\.com/pin/([^/]+)"] test = [("https://www.pinterest.com/pin/858146903966145189/", { "url": "7abf2be76bf03d452feacf6e000b040fc2706b80", "keyword": "e1a2ce625ece86f0b31f0ae94a3af3d72e6454b9", @@ -61,7 +61,7 @@ class PinterestBoardExtractor(PinterestExtractor): category = "pinterest" subcategory = "board" directory_fmt = ["{category}", "{user}", "{board}"] - pattern = [r"(?:https?://)?(?:www\.)?pinterest\.com/(?!pin/)([^/]+)/([^/]+)"] + pattern = [r"(?:https?://)?(?:[^./]+\.)?pinterest\.com/(?!pin/)([^/]+)/([^/]+)"] test = [("https://www.pinterest.com/g1952849/test-/", { "url": "705ee521630a5d613b0449d694a5345e684572a9", "keyword": "2815716747f84fa0a4047d29d71df8ae96a0e177",