aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/deviantart.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-09-07 20:40:45 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-09-07 20:40:45 -0400
commit243b2597edb922fe7e0b0d887e80bb7ebbe72ab7 (patch)
tree1a42ddec8ae1f21e3c4c88849818e1ea9140aaaa /gallery_dl/extractor/deviantart.py
parent1df55d9de48105dace9cc16f1511dba3c9a6da6f (diff)
New upstream version 1.30.6.upstream/1.30.6
Diffstat (limited to 'gallery_dl/extractor/deviantart.py')
-rw-r--r--gallery_dl/extractor/deviantart.py12
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\":\"', '\\',)