Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
ciecplib 0.9.0
ciecplib 0.9.0
  • Installation

Modules

  • ciecplib
    • get
    • get_cert
    • get_cookie
    • head
    • post
    • Session
  • ciecplib.cookies
    • extract_session_cookie
    • has_session_cookies
    • load_cookiejar
    • ECPCookieJar
  • ciecplib.kerberos
    • find_principal
    • has_credential
    • realm
  • ciecplib.utils
    • get_ecpcookie_path
    • get_idp_url
    • get_idps
    • get_x509_proxy_path
    • random_string
    • EcpIdentityProvider
  • ciecplib.x509
    • check_cert
    • generate_proxy
    • load_cert
    • load_pkcs12
    • print_cert_info
    • time_left
    • write_cert

Command-line scripts

  • ecp-cert-info
  • ecp-curl
  • ecp-get-cert
  • ecp-get-cookie
Back to top
View this page

extract_session_cookie¶

ciecplib.cookies.extract_session_cookie(jar, url)¶

Return a session cookie for the given URL from the jar.

Parameters:
  • jar (http.cookiejar.CookieJar) – the cookie jar to check

  • url (str) – the URL of the service that needs cookies

Returns:

cookie (http.cookiejar.Cookie) – the relevant cookie

Raises:

ValueError – if no appropriate cookie is found

Next
has_session_cookies
Previous
ciecplib.cookies
Copyright © 2025, Cardiff University
Made with Sphinx and @pradyunsg's Furo
On this page
  • extract_session_cookie
    • extract_session_cookie()