Firefox:
- Install cookie.txt add-on from https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/
- Open website whose cookies you want to extract
- Login to Website
- Click on the cookie.txt icon from Firefox toolbar, click "Current site" and save the file somewhere.
Chrome do the same you should install cookie.txt from chrome webstore like(https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid?hl=en).