def save_headers(session): headers = pickle.dumps(session.headers) if test == False: headers_file = generic_utility.headers_file() else: headers_file = 'headers' file_utility.write(headers_file, headers)
def save_cookies(session): cookies = pickle.dumps(session.cookies) if test == False: file_name = generic_utility.cookies_file() else: file_name = 'cookies' file_utility.write(file_name, cookies)
def save_cookies(session): cookies = pickle.dumps(requests.utils.dict_from_cookiejar(session.cookies)) if test == False: file_name = generic_utility.cookies_file() else: file_name = 'cookies' file_utility.write(file_name, cookies)