Skip to content

Instantly share code, notes, and snippets.

@0xpizza
Created May 24, 2022 02:54
Show Gist options
  • Save 0xpizza/0e65cfec662afa5e6ced0df801daa936 to your computer and use it in GitHub Desktop.
Save 0xpizza/0e65cfec662afa5e6ced0df801daa936 to your computer and use it in GitHub Desktop.
def netscape_format(cookiedata:dict) -> str:
cookie_file = '# Netscape HTTP Cookie File\n'
fmt_cookie_line = '{}\tTRUE\t/\tFALSE\t9999999999\t{}\t{}\n'
for k,v in cookiedata.items():
cookie_file += fmt_cookie_line.format(k, v)
return cookie_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment