code: def save_to_file(self, path):
          
  
          with open(path, 'w') as out:
              out.write(json.dumps(self.get_dict()))
docs: Dump all cookies to file.
  
          Cookies are dumped as JSON-serialized dict of keys and values.