Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decodeURI fix #61

Open
ignas-x opened this issue Dec 6, 2024 · 2 comments
Open

decodeURI fix #61

ignas-x opened this issue Dec 6, 2024 · 2 comments

Comments

@ignas-x
Copy link

ignas-x commented Dec 6, 2024

Hi, program is throwing an error on index.js line 37

c:\Users\.........\Domestika\domestika-downloader-main\index.js:37
const access_token = regex_token.exec(decodeURI(_credentials_))[1];
                                                               ^
TypeError: Cannot read properties of null (reading '1')
    at Object.<anonymous> (c:\Users\.........\_Domestika\domestika-downloader-main\index.js:37:64)

This happens because decodeURI isn't enough to decode _credentials_ cookie (there are still leftovers like %3A %2C), so I replaced it with decodeURIComponent and it works like a charm now. Thanks a lot for this tool!

const access_token = regex_token.exec(decodeURIComponent(_credentials_))[1];

image

@ReneR97
Copy link
Owner

ReneR97 commented Dec 7, 2024

you can make a pull request if you want, Will be happy to merge it

@ignas-x
Copy link
Author

ignas-x commented Dec 12, 2024

sorry, I do not know how :))) please do if you can.

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

No branches or pull requests

2 participants