From e17b1d5073a16823735957eec94b1a5713d78528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 8 Jun 2024 01:42:35 +0200 Subject: [PATCH] [deviantart] fix 2c8aa9b2 (#5696) --- gallery_dl/extractor/deviantart.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 77e9db38..2199cc8a 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -1730,18 +1730,13 @@ class DeviantartEclipseAPI(): url = "{}/{}/about".format(self.extractor.root, user) page = self.request(url).text - module_id = text.extr(page, ' data-moduleid="', '"') gruser_id = text.extr(page, ' data-userid="', '"') - if not module_id: - pos = page.find('\\"name\\":\\"watching\\"') - if pos < 0: - raise exception.NotFoundError("'watching' module ID") - module_id = text.rextract( - page, '\\"id\\":', ',', pos)[0].strip('" ') - - print(module_id) - exit() + pos = page.find('\\"name\\":\\"watching\\"') + if pos < 0: + raise exception.NotFoundError("'watching' module ID") + module_id = text.rextract( + page, '\\"id\\":', ',', pos)[0].strip('" ') self._fetch_csrf_token(page) return gruser_id, module_id