Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

[Enhancement] [Suggestion] Getting the required cookies using simple javascript #9

Open
FireHead90544 opened this issue Oct 4, 2021 · 1 comment

Comments

@FireHead90544
Copy link

FireHead90544 commented Oct 4, 2021

[Just a small friendly enhancement for getting the prerequisites :)]

After logging in/signing up in the gogoanime's website, the below code can be pasted into the console tab of the developer tools to get the required cookies directly in the hand without needing to install any extension. This can be added in the readme as an alternative method to get cookies. I am a python dev though, It's just a simple thing so I thought it would be better to create an issue for this rather than forking and generating a PR.

const value = `; ${document.cookie}`;
const cookies = ['gogoanime', 'auth']
for (let cookie in cookies){
   const parts = value.split(`; ${cookies[cookie]}=`);
   if (parts.length === 2){console.log(`\"${cookies[cookie]}\": \"${parts.pop().split(';').shift()}\"`);}
}

Example:
image

@Yme1669
Copy link

Yme1669 commented Jan 31, 2022

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants