diff options
| author | 2020-01-21 01:08:43 -0500 | |
|---|---|---|
| committer | 2020-01-21 01:08:43 -0500 | |
| commit | 4366125d2580982abb57bc65a26fc1fb8ef2a5df (patch) | |
| tree | 743a26348e360c8b7f5eb89d4f704b015e902e68 /gallery_dl/extractor/pinterest.py | |
| parent | bc435e826dbe37969d9cbe280f58810d054932cc (diff) | |
New upstream version 1.12.3upstream/1.12.3
Diffstat (limited to 'gallery_dl/extractor/pinterest.py')
| -rw-r--r-- | gallery_dl/extractor/pinterest.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gallery_dl/extractor/pinterest.py b/gallery_dl/extractor/pinterest.py index b72a896..24a0a55 100644 --- a/gallery_dl/extractor/pinterest.py +++ b/gallery_dl/extractor/pinterest.py @@ -60,9 +60,8 @@ class PinterestPinExtractor(PinterestExtractor): test = ( ("https://www.pinterest.com/pin/858146903966145189/", { "url": "afb3c26719e3a530bb0e871c480882a801a4e8a5", - # image version depends on CDN server used - # "content": "d3e24bc9f7af585e8c23b9136956bd45a4d9b947", - # "content": "4c435a66f6bb82bb681db2ecc888f76cf6c5f9ca", + "content": ("4c435a66f6bb82bb681db2ecc888f76cf6c5f9ca", + "d3e24bc9f7af585e8c23b9136956bd45a4d9b947"), }), ("https://www.pinterest.com/pin/858146903966145188/", { "exception": exception.NotFoundError, @@ -171,9 +170,7 @@ class PinterestPinitExtractor(PinterestExtractor): self.shortened_id) response = self.request(url, method="HEAD", allow_redirects=False) location = response.headers.get("Location") - if not location or location in ("https://api.pinterest.com/None", - "https://pin.it/None", - "https://www.pinterest.com"): + if not location or not PinterestPinExtractor.pattern.match(location): raise exception.NotFoundError("pin") yield Message.Queue, location, {"_extractor": PinterestPinExtractor} |
