[deviantart] fix 2c8aa9b2 (#5696)

pull/5712/head
Mike Fährmann 3 months ago
parent f160859c5c
commit e17b1d5073
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1730,18 +1730,13 @@ class DeviantartEclipseAPI():
url = "{}/{}/about".format(self.extractor.root, user) url = "{}/{}/about".format(self.extractor.root, user)
page = self.request(url).text page = self.request(url).text
module_id = text.extr(page, ' data-moduleid="', '"')
gruser_id = text.extr(page, ' data-userid="', '"') gruser_id = text.extr(page, ' data-userid="', '"')
if not module_id: pos = page.find('\\"name\\":\\"watching\\"')
pos = page.find('\\"name\\":\\"watching\\"') if pos < 0:
if pos < 0: raise exception.NotFoundError("'watching' module ID")
raise exception.NotFoundError("'watching' module ID") module_id = text.rextract(
module_id = text.rextract( page, '\\"id\\":', ',', pos)[0].strip('" ')
page, '\\"id\\":', ',', pos)[0].strip('" ')
print(module_id)
exit()
self._fetch_csrf_token(page) self._fetch_csrf_token(page)
return gruser_id, module_id return gruser_id, module_id

Loading…
Cancel
Save