Skip to content

Instantly share code, notes, and snippets.

@chrisarnott86
Created September 2, 2019 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisarnott86/3e55ca7edf39a358f9375964539d77fb to your computer and use it in GitHub Desktop.
Save chrisarnott86/3e55ca7edf39a358f9375964539d77fb to your computer and use it in GitHub Desktop.
Extract cookie data from firefox for streamlink tvplayer plugin
@tmatthews5511
Copy link

tmatthews5511 commented Dec 1, 2019

Hello Chris, Could you verify if this script is still fetching the cookie properly? It was not for me, but then again, I could have been doing something very stupid. ta, t.

@chrisarnott86
Copy link
Author

Hi, I used it just the other day and it seems fine. The cookie does expire after a few weeks though so you may need to login to the tvplayer site from the browser and start a stream to update the cookie. Hope that helps!

@tmatthews5511
Copy link

tmatthews5511 commented Dec 2, 2019 via email

@chrisarnott86
Copy link
Author

chrisarnott86 commented Dec 2, 2019

My script is pretty dumb when it comes to choosing the correct firefox profile, it may be that it's picking up a cookie from an old profile. I'm sure you'll be able to adjust the prof=grep "Path" ~/.mozilla/firefox/profiles.ini|cut -d '=' -f 2|tail -1 line to make sure it gets the correct profile. Go to about:profiles in firefox to verify which one is the active one.

@tmatthews5511
Copy link

tmatthews5511 commented Dec 2, 2019 via email

@chrisarnott86
Copy link
Author

I checked that the script pulls the same value as is in the broswer. If you're getting a value that's different then it must be coming from a different firefox profile, or maybe you've got extra cookies stored that meet the same query parameters? Have you got more than one entry for persistence-v2 when you browse the cookies in firefox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment