diff options
| author | 2025-09-07 20:40:52 -0400 | |
|---|---|---|
| committer | 2025-09-07 20:40:52 -0400 | |
| commit | 88f40b9b0dc47fa22a209e8246d97a43f4b60cb2 (patch) | |
| tree | 5764999c5d1ce99ccebd92dddb7a3914b55e43c2 /gallery_dl/extractor/deviantart.py | |
| parent | 7ac1b3bb04430b981f4f796fd765499cdc8b67ec (diff) | |
| parent | 243b2597edb922fe7e0b0d887e80bb7ebbe72ab7 (diff) | |
Update upstream source from tag 'upstream/1.30.6'
Update to upstream version '1.30.6'
with Debian dir 9f14996b07ee3246bdcde2ec12796c77da2a3060
Diffstat (limited to 'gallery_dl/extractor/deviantart.py')
| -rw-r--r-- | gallery_dl/extractor/deviantart.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index d900f4c..39690da 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -1356,7 +1356,8 @@ class DeviantartSearchExtractor(DeviantartExtractor): def _search_html(self, params): url = self.root + "/search" - + find = text.re(r'''href="https://www.deviantart.com/([^/?#]+)''' + r'''/(art|journal)/(?:[^"]+-)?(\d+)''').findall while True: response = self.request(url, params=params) @@ -1364,12 +1365,11 @@ class DeviantartSearchExtractor(DeviantartExtractor): raise exception.AbortExtraction("HTTP redirect to login page") page = response.text - for dev in DeviantartDeviationExtractor.pattern.findall( - page)[2::3]: + for user, type, did in find(page)[:-3:3]: yield { - "deviationId": dev[3], - "author": {"username": dev[0]}, - "isJournal": dev[2] == "journal", + "deviationId": did, + "author": {"username": user}, + "isJournal": type == "journal", } cursor = text.extr(page, r'\"cursor\":\"', '\\',) |
