anikimiapi
anikimiapi copied to clipboard
[Enhancement] [Suggestion] Getting the required cookies using simple javascript
[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:

👍