Skip to content

Commit

Permalink
[gofile] update 'website_token' extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Jan 27, 2024
1 parent 1f7101d commit 3433481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/extractor/gofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ def _create_account(self):
def _get_website_token(self):
self.log.debug("Fetching website token")
page = self.request(self.root + "/dist/js/alljs.js").text
return text.extr(page, 'fetchData.websiteToken = "', '"')
return text.extr(page, 'fetchData.wt = "', '"')

def _get_content(self, content_id, password=None):
if password is not None:
password = hashlib.sha256(password.encode()).hexdigest()
return self._api_request("getContent", {
"contentId" : content_id,
"token" : self.api_token,
"websiteToken": self.website_token,
"wt" : self.website_token,
"password" : password,
})

Expand Down

0 comments on commit 3433481

Please sign in to comment.