browser = webdriver.Chrome()
browser.get(url="http://www.80lib.com/user/enlist/wose.html") #先进入页面再添加cookie
Cookie = "PHPSESSID=vot9oap6nll53q0p09934j21jm; _ga=GA1.2.187670977.1637156224; Hm_lvt_550672a265db97bedecf48ee742a872a=1644376552; _gid=GA1.2.54442079.1644376553; ms=wose; _gat_gtag_UA_115631786_1=1; loginuser=eyJpdiI6InFZTlRMbnN3clZnYWdqeGUrc1UxZlE9PSIsInZhbHVlIjoid29GR1ZMcFg2RitXc1NvSkxEa0xEdWFWQzVnYzB1b0loMkl1YWNQVlUxRT0iLCJtYWMiOiIwMGQ1OGZiODhiZDdlNzI1Y2U2YzJlN2M1Zjg3ZTViYTBjZTNkZWZiMTdkNzFjMGJhYWVlOTMzOWE3NWMwZjZmIn0%3D; loginpass=eyJpdiI6Ijl0cWFFeHFjU3hrWVVcL2NOdm9JT2NRPT0iLCJ2YWx1ZSI6IlwvamtKeGFONG5ieVMyRGJuR2lVclFnPT0iLCJtYWMiOiI2N2RmYThiZGMyYzM5MzUzOTBkMTFiYjA2MmU3OGU0Yzg2MzhiYjA4OGExNWQ1NWIyOWY3ODk2MGFkNTljMGMyIn0%3D; sid=eyJpdiI6InNZcGk4a1p6UFQ0MFEzZHREeXl3WUE9PSIsInZhbHVlIjoidUo4MXlWSG5WSUNzVFBNWUVvWHNKa1hVMExCRmwxdzFac2NsS1VUTEZuM2hHSlF6RmpVMVpseklsb2NVYm9PSSIsIm1hYyI6ImI2MjBhYTIxOGUyYTJlNWQ1MGQ3OGQ5MTA3ZjUwYmRmM2E5NGNjMzU2YjQ1OTNlM2M0MWEzYWIwMjFiYzQ3NmEifQ%3D%3D; XSRF-TOKEN=eyJpdiI6InROUnlyd3h5YnFZZzcwUUN3ekJzQkE9PSIsInZhbHVlIjoiMmlHclwvb3hHVXA4XC9ldkRVTnAxUmFXV3JyOXlyNit2WGxQa1dLN29xMU40VkRDTk5PdStxK2FpZHM0R3kwQlhcLyIsIm1hYyI6Ijc1MjBhODYxMjQxM2RiYjdkNWJmNGEwMjFhNDNiYmQ3NTM5YzRlNTRmMWI1MDFlZDU2ZWQ2ZWY1ZWMyYmRmMWEifQ%3D%3D; 80lib123_session=eyJpdiI6IkJReHAxeTBLMGNuMlRETEp2ZkJuY1E9PSIsInZhbHVlIjoiNElUVUpBbVlZR2dtNHZpcktONmh2d2hJb1wvT255Z3RBZnc1VVhOUXVwcHJFMkF0OTJRK3djRk9yUFFBOUJSSW4iLCJtYWMiOiI5NDhjYjZlYjhjMjg0ZDAwMjRlZGQ3YTIzNzM4NGVhMjFmMGYwZDVjOGZiMDM5NDFlODVhYmQ5N2Y4ZTY5Zjg4In0%3D; Hm_lpvt_550672a265db97bedecf48ee742a872a=1644392397"
Cookie = Cookie.split('; ')
for attribute in Cookie:
tmp = attribute.split('=')
browser.add_cookie({'name':tmp[0], 'value':tmp[1]})
Cookie:F12-网络-标头 找对应值