morsel_to_cookie(mosel) method raise TypeError: create_cookie() got unexpected keyword arguments: ['path_specified', 'domain_specified', 'port_specified', 'domain_initial_dot'].
so we should remove these param from create_cookie(...)
value=morsel.value,
version=morsel['version'] or 0,
port=None,
- port_specified=False,
domain=morsel['domain'],
- domain_specified=bool(morsel['domain']),
- domain_initial_dot=morsel['domain'].startswith('.'),
path=morsel['path'],
- path_specified=bool(morsel['path']),
secure=bool(morsel['secure']),
expires=morsel['max-age'] or morsel['expires'],
discard=False,