From ad4b02508f505946e57c9f47059ae40a7a12b040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 12 Jan 2017 22:35:42 +0100 Subject: [PATCH] trying to understand travis-ci unit test failures - added some debug output via logging module - unit tests work on my machine (tm) --- gallery_dl/extractor/common.py | 9 ++++++++- gallery_dl/extractor/imagehosts.py | 2 -- test/test_extractors.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index fb0db9d0..f0c3ca5e 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2014, 2015 Mike Fährmann +# Copyright 2014-2017 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -10,11 +10,15 @@ import time import queue +import logging import requests import threading from .message import Message from .. import config +log = logging.getLogger(__name__) + + class Extractor(): category = "" @@ -92,4 +96,7 @@ def safe_request(session, url, method="GET", *args, **kwargs): continue # everything ok -- proceed to download + log.debug(url) + log.debug(r.headers) + log.debug(r.text) return r diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index e32b0b5f..0487001e 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -243,8 +243,6 @@ class ImgspiceImageExtractor(ImagehostImageExtractor): pattern = [r"(?:https?://)?((?:www\.)?imgspice\.com/([^/]+))"] test = [("https://imgspice.com/zop38mvvq29u/", { "url": "a45833733c02b64d105363ffd8fd19f06992a2f7", - "keyword": "5218f63195e6a487c0881fd1cda78c535c61b462", - "content": "0c8768055e4e20e7c7259608b67799171b691140", })] https = True params = None diff --git a/test/test_extractors.py b/test/test_extractors.py index 092a0b04..2f829906 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -55,7 +55,7 @@ if __name__ == '__main__' and len(sys.argv) > 1: ] del sys.argv[1:] -skip = ["kissmanga"] +skip = [] for extr in extractors: if extr.category in skip: continue