ytermusic icon indicating copy to clipboard operation
ytermusic copied to clipboard

Automatically extract cookie from Firefox

Open Jak2k opened this issue 2 years ago • 4 comments

As far as I know, Firefox stores it's cookies in a SQLite database. You could display a ff-profile-selector under the manual instructions and then extract the cookie from the selected profile.

Jak2k avatar Mar 15 '24 20:03 Jak2k

That could be a really good idea haven't yet looked on how to do that but that's definitely an option.

ccgauche avatar Mar 16 '24 10:03 ccgauche

If I don't forget it, I'll look up the query today.

Jak2k avatar Mar 16 '24 11:03 Jak2k

Which cookies of the 62 are needed? In firefox's database (~/.mozilla/firefox/<PROFILE>/cookies.sqlite) they are are all saved as host = '.youtube.com' in the table moz_cookies:

SELECT * FROM moz_cookies WHERE host = '.youtube.com';

Jak2k avatar Mar 24 '24 18:03 Jak2k

I found that this query removes most unnecessary cookies:

SELECT name, value FROM moz_cookies WHERE host '.youtube.com' AND originAttributes = '' AND value != '' AND isSecure = 1;

Minemobs avatar Aug 03 '24 17:08 Minemobs