kairi003 / Get-cookies.txt-LOCALLY

Get cookies.txt, NEVER send information outside.
MIT License
367 stars 32 forks source link

Export cookies without extension ? #48

Closed SheepDomination closed 10 months ago

SheepDomination commented 10 months ago

Is it possible to what this extension does without using the extension ?

kairi003 commented 10 months ago

What do you mean? If you want to do it with just regular JavaScript, it's not possible. You need access to the browser's extension API. Other methods could include monitoring communications or reading the browser's DB.

SheepDomination commented 10 months ago

What do you mean? If you want to do it with just regular JavaScript, it's not possible. You need access to the browser's extension API. Other methods could include monitoring communications or reading the browser's DB.

I was hoping there would be a straight forward method but since you mention monitoring the browser's DB and or access the extension API it seems as if that other method I thought exists; doesn't exist, without use of this extension.

kairi003 commented 10 months ago

Sorry, I forgot. If you just want to get the value of a specific site cookie, the Application tab of browser's developer tools shows it. You can manually copy this and write it to a text file.

SheepDomination commented 10 months ago

Sorry, I forgot. If you just want to get the value of a specific site cookie, the Application tab of browser's developer tools shows it. You can manually copy this and write it to a text file.

I need the value of YouTube watch later as a cookie file in Netscape format. I have opened the Application tab of in this case Edge which is essentially Chrome and gone to the Cookies sub-tab and seen a bunch of cookies with values but don't know which to pick that I'm after ?

kairi003 commented 10 months ago

Not all of them are necessary, but I don't know which ones are necessary. Additionally, incomplete requests may be considered unauthorized access. If you don't want to copy all the cookies manually, I recommend using the extension.

SheepDomination commented 10 months ago

There are ten cookies all from the page in this case "Watch Later" on YouTube which I'm unsure if any is specific for this page; or if all of them are for this page using the Application > Cookies in the developer tools ?

Should I copy all the cookies well I consider them names with values 😉and save them as a cookies.txt file; and if so, how do I save them all as a cookies.txt file ?

kairi003 commented 10 months ago

If you want to export Youtube cookies using this extension, please execute "Export" or "Export All" while accessing YouTube. I'm not a Youtube developer, and since this is just an issue page for this extension, I can't provide any further support.

SheepDomination commented 10 months ago

I tried twice already, what should be in the cookies file; is there anything I should look for related to the Watch Later List for the YouTube account ?

It may be the extension for my browser is not saving this information.

kairi003 commented 10 months ago

I used the extension in my browser to export youtube cookies (not "Export All Cookies", "Export" for only youtube domains) and confirmed that when loaded in yt-dlp, I can restore my login and browse the list to Watch Later. There are no functional problems.

If you think there is a problem with the extension working, please reset your browser to see if it reproduces the problem. Then provide us with a screenshot of the problem, etc. But be careful not to expose the cookies value. If it is just a key, there is almost no problem.

If you simply need the cookies for some software, please ask that community. If you are doing your own development, please ask on StackOverflow, etc., not in this Issue.

kairi003 commented 10 months ago

Close this Issue. If additional issues become apparent and they are directly related to this extension, open a new Issue with the appropriate title.