From d82508f245020be84e9b16be3d51f987b570b509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 27 Jan 2017 22:39:44 +0100 Subject: [PATCH] fix tests for turboimagehost and pinterest --- gallery_dl/extractor/imagehosts.py | 2 +- gallery_dl/extractor/pinterest.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index 0487001e..37f0fea1 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -304,7 +304,7 @@ class TurboimagehostImageExtractor(ImagehostImageExtractor): pattern = [(r"(?:https?://)?((?:www\.)?turboimagehost\.com/p/(\d+)" r"/[^/]+\.html)")] test = [("http://www.turboimagehost.com/p/29690902/test--.png.html", { - "url": "c624dc7784de515342117a2678fee6ecf1032d79", + "url": "ada27a4e04f9ffd5ab7cd787f4559d5b3744520b", "keyword": "a4527f14675e4512ef317ee0401940c711fbe012", "content": "0c8768055e4e20e7c7259608b67799171b691140", })] diff --git a/gallery_dl/extractor/pinterest.py b/gallery_dl/extractor/pinterest.py index 0bfec861..f1464955 100644 --- a/gallery_dl/extractor/pinterest.py +++ b/gallery_dl/extractor/pinterest.py @@ -124,7 +124,8 @@ class PinterestPinitExtractor(PinterestExtractor): def items(self): response = self.session.head(self.url) location = response.headers.get("Location") - if not location or location == "https://www.pinterest.com": + if not location or location in ("https://api.pinterest.com/None", + "https://www.pinterest.com"): raise exception.NotFoundError("pin") yield Message.Queue, location