diff --git a/gallery_dl/downloader/text.py b/gallery_dl/downloader/text.py index ac0f12e3..7ed41790 100644 --- a/gallery_dl/downloader/text.py +++ b/gallery_dl/downloader/text.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -# Copyright 2014-2016 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 # published by the Free Software Foundation. -"""Downloader module for text:// urls""" +"""Downloader module for text: urls""" from .common import BasicDownloader @@ -26,7 +26,7 @@ class Downloader(BasicDownloader): self.out.start(pathfmt.path) self.downloading = True - with pathfmt.open() as file: - file.write(bytes(url[7:], "utf-8")) + with pathfmt.open("w") as file: + file.write(url[5:]) self.downloading = False self.out.success(pathfmt.path, 0) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index b32a64d5..232504d3 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -165,8 +165,8 @@ class DeviantartFavoriteExtractor(DeviantartExtractor): r"(?:/((\d+)/([^/?]+)|\?catpath=/))?"] test = [ ("http://rosuuri.deviantart.com/favourites/58951174/Useful", { - "url": "2545427f52012a8b9b07c95ca5c91002d5bf4f18", - "keyword": "7ba0e75aeeb0f51541c4a2411410f8e3b3717641", + "url": "85d1dd231be0b880c69dc947b564595fe3dd8248", + "keyword": "9ae736fd906d7b3a41d81dd5f2488fd8537a5858", }), ("http://h3813067.deviantart.com/favourites/", { "url": "71345ce3bef5b19bd2a56d7b96e6b5ddba747c2e", @@ -216,7 +216,7 @@ class DeviantartJournalExtractor(DeviantartExtractor): subcategory = "journal" pattern = [r"(?:https?://)?([^.]+)\.deviantart\.com/journal/?$"] test = [("http://shimoda7.deviantart.com/journal/", { - "url": "05204bddf5ebba330d73cec76bcd55b1249c6159", + "url": "d046614f41849e4a2a8d8a20c5d00cbe814ca6f2", "keyword": "8434f8bdd4b38634e206c8689a0906ac10c3fa77", })] @@ -343,7 +343,7 @@ class DeviantartAPI(): return -JOURNAL_TEMPLATE = """text:// +JOURNAL_TEMPLATE = """text:
diff --git a/gallery_dl/extractor/imgchili.py b/gallery_dl/extractor/imgchili.py index 0196cb47..333123cb 100644 --- a/gallery_dl/extractor/imgchili.py +++ b/gallery_dl/extractor/imgchili.py @@ -52,7 +52,6 @@ class ImgchiliImageExtractor(ImgchiliExtractor): "89427136_test___quot;___gt;.png"), { "url": "b93d92a6b58eb30a7ff6f9729cb748d25fea0c86", "keyword": "376c4584dfae7d7d2e88687d4ee9618bbfd0a35c", - "content": "3b2a74be551b0b5549c831c9994760ef35138b22", })] def get_job_metadata(self, page): diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py index d3bac06b..f12c6083 100644 --- a/gallery_dl/extractor/pixiv.py +++ b/gallery_dl/extractor/pixiv.py @@ -62,7 +62,7 @@ class PixivUserExtractor(Extractor): work["extension"] = "zip" yield Message.Url, url, work work["extension"] = "txt" - yield Message.Url, "text://"+framelist, work + yield Message.Url, "text:"+framelist, work elif work["page_count"] == 1: yield Message.Url, work["url"], work diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 839e26f6..4f09b206 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -150,9 +150,9 @@ class PathFormat(): elif not skipmode: self.exists = lambda: False - def open(self): + def open(self, mode="wb"): """Open file to 'realpath' and return a corresponding file object""" - return open(self.realpath, "wb") + return open(self.realpath, mode) def exists(self): """Return True if 'path' is complete and refers to an existing path""" diff --git a/test/test_extractors.py b/test/test_extractors.py index 8c296400..86a26d29 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -51,7 +51,7 @@ skip = [ # dont work on travis-ci "exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", # temporary issues - + "yomanga", ] # enable selective testing for direct calls if __name__ == '__main__' and len(sys.argv) > 1: