diff --git a/gallery_dl/extractor/mastodon.py b/gallery_dl/extractor/mastodon.py index fc6d6d28..7fe5cccd 100644 --- a/gallery_dl/extractor/mastodon.py +++ b/gallery_dl/extractor/mastodon.py @@ -184,6 +184,7 @@ def generate_extractors(): Extr.instance = instance Extr.pattern = (r"(?:https?://)?" + pattern + r"/@([^/?&#]+)(?:/media)?/?$") + Extr.test = info.get("test-user") Extr.root = root Extr.access_token = token symtable[Extr.__name__] = Extr @@ -196,6 +197,7 @@ def generate_extractors(): Extr.category = category Extr.instance = instance Extr.pattern = r"(?:https?://)?" + pattern + r"/@[^/?&#]+/(\d+)" + Extr.test = info.get("test-status") Extr.root = root Extr.access_token = token symtable[Extr.__name__] = Extr @@ -207,6 +209,15 @@ EXTRACTORS = { "access-token" : "Y06R36SMvuXXN5_wiPKFAEFiQaMSQg0o_hGgc86Jj48", "client-id" : "dBSHdpsnOUZgxOnjKSQrWEPakO3ctM7HmsyoOd4FcRo", "client-secret": "DdrODTHs_XoeOsNVXnILTMabtdpWrWOAtrmw91wU1zI", + "test-user" : ("https://mastodon.social/@jk", { + "pattern": r"https://files.mastodon.social/media_attachments" + r"/files/\d+/\d+/\d+/original/\w+", + "range": "1-60", + "count": 60, + }), + "test-status" : ("https://mastodon.social/@jk/103794036899778366", { + "count": 4, + }), }, "pawoo.net": { "category" : "pawoo", diff --git a/test/test_results.py b/test/test_results.py index 9064810f..bfed2ca9 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -27,9 +27,6 @@ TRAVIS_SKIP = { # temporary issues, etc. BROKEN = { - "dokireader", - "mangafox", - "mangahere", "photobucket", "worldthree", } @@ -317,6 +314,9 @@ def setup_test_config(): config.set(("extractor", "mangoxo") , "username", "LiQiang3") config.set(("extractor", "mangoxo") , "password", "5zbQF10_5u25259Ma") + config.set(("extractor", "mastodon.social"), "access-token", + "Blf9gVqG7GytDTfVMiyYQjwVMQaNACgf3Ds3IxxVDUQ") + config.set(("extractor", "deviantart"), "client-id", "7777") config.set(("extractor", "deviantart"), "client-secret", "ff14994c744d9208e5caeec7aab4a026")