diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 60846f52..836fae78 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -907,19 +907,18 @@ class DeviantartStashExtractor(DeviantartExtractor): archive_fmt = "{index}.{extension}" pattern = (r"(?:https?://)?(?:(?:www\.)?deviantart\.com/stash|sta\.sh)" r"/([a-z0-9]+)") - example = "https://sta.sh/abcde" + example = "https://www.deviantart.com/stash/abcde" skip = Extractor.skip def __init__(self, match): DeviantartExtractor.__init__(self, match) self.user = None - self.stash_id = match.group(1) def deviations(self, stash_id=None): if stash_id is None: - stash_id = self.stash_id - url = "https://sta.sh/" + stash_id + stash_id = self.groups[0] + url = "https://www.deviantart.com/stash/" + stash_id page = self._limited_request(url).text if stash_id[0] == "0": @@ -932,19 +931,11 @@ class DeviantartStashExtractor(DeviantartExtractor): yield deviation return - for item in text.extract_iter( - page, 'class="stash-thumb-container', ''): - url = text.extr(item, ' 2: - yield from self.deviations(stash_id) + for sid in text.extract_iter( + page, 'href="https://www.deviantart.com/stash/', '"'): + if sid == stash_id or sid.endswith("#comments"): + continue + yield from self.deviations(sid) class DeviantartFavoriteExtractor(DeviantartExtractor): diff --git a/test/results/deviantart.py b/test/results/deviantart.py index 7e23417b..0e8e371c 100644 --- a/test/results/deviantart.py +++ b/test/results/deviantart.py @@ -61,7 +61,6 @@ __tests__ = ( "transparency": bool, "width" : int, }, - "da_category" : str, "date" : datetime.datetime, "deviationid" : str, "?download_filesize": int, @@ -283,7 +282,6 @@ __tests__ = ( "transparency": False, "width" : 6400 }, - "da_category" : "Uncategorized", "date" : "dt:2024-01-02 21:16:06", "deviationid" : "8C8D6B28-766A-DE21-7F7D-CE055C3BD50A", "download_filesize": 84510, @@ -375,7 +373,6 @@ __tests__ = ( "height" : 128, "src" : r"re:https://wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/940f2d05-c5eb-4917-8192-7eb6a2d508c6/dcvdmbc-e506cdcf-3208-4c20-85ab-0bfa8a7bcb16.png\?token=ey.+", }, - "da_category" : "Uncategorized", "date" : "dt:2018-12-26 14:49:27", "deviationid" : "A4A6AD52-8857-46EE-ABFE-86D49D4FF9D0", "download_filesize": 380,