|
|
@ -1730,15 +1730,21 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
gruserid, pos = text.extract(page, ' data-userid="', '"')
|
|
|
|
module_id = text.extr(page, ' data-moduleid="', '"')
|
|
|
|
|
|
|
|
gruser_id = text.extr(page, ' data-userid="', '"')
|
|
|
|
|
|
|
|
|
|
|
|
pos = page.find('\\"type\\":\\"watching\\"', pos)
|
|
|
|
if not module_id:
|
|
|
|
|
|
|
|
pos = page.find('\\"name\\":\\"watching\\"')
|
|
|
|
if pos < 0:
|
|
|
|
if pos < 0:
|
|
|
|
raise exception.NotFoundError("module")
|
|
|
|
raise exception.NotFoundError("'watching' module ID")
|
|
|
|
moduleid = text.rextract(page, '\\"id\\":', ',', pos)[0].strip('" ')
|
|
|
|
module_id = text.rextract(
|
|
|
|
|
|
|
|
page, '\\"id\\":', ',', pos)[0].strip('" ')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(module_id)
|
|
|
|
|
|
|
|
exit()
|
|
|
|
|
|
|
|
|
|
|
|
self._fetch_csrf_token(page)
|
|
|
|
self._fetch_csrf_token(page)
|
|
|
|
return gruserid, moduleid
|
|
|
|
return gruser_id, module_id
|
|
|
|
|
|
|
|
|
|
|
|
def _fetch_csrf_token(self, page=None):
|
|
|
|
def _fetch_csrf_token(self, page=None):
|
|
|
|
if page is None:
|
|
|
|
if page is None:
|
|
|
|