怎么更改存储路径?
url='https://cn.'import requests
import random
from selenium import webdriver
import win32api
import win32con
import win32clipboard
from ctypes import *
from selenium. import ActionChains
import time
import re
from lxml import etree
def keyDown(keyName):
win32api.keybd_event(VK_CODE[keyName],0,0,0)
def keyUp(keyName):
win32api.keybd_event(VK_CODE[keyName],0,win32con.KEYEVENTF_KEYUP,0)
VK_CODE={'enter':0x0D,'down_arrow':0x28}
browser = webdriver.Chrome()
browser.maximize_window()
browser.get(url)
time.sleep(2)
path = 'F:\spider\'
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardText(path)
win32clipboard.CloseClipboard()
img = browser.find_element_by_xpath('//*[@id="mainImageWindow"]/div[2]/div/div/div/img')
action = ActionChains(browser).move_to_element(img)
action.context_click(img).perform()
time.sleep(1)
win32api.keybd_event(86, 0, 0, 0)
time.sleep(1)
win32api.keybd_event(0x11, 0, 0, 0)
win32api.keybd_event(0x56, 0, 0, 0)
win32api.keybd_event(0x56, 0, win32con.KEYEVENTF_KEYUP, 0)
win32api.keybd_event(0x11, 0, win32con.KEYEVENTF_KEYUP, 0)
win32api.keybd_event(0x0D, 0, 0, 0)
win32api.keybd_event(0x12, 0, 0, 0)
win32api.keybd_event(0x53, 0, 0, 0)
win32api.keybd_event(0x53, 0, win32con.KEYEVENTF_KEYUP, 0)
win32api.keybd_event(0x12, 0, win32con.KEYEVENTF_KEYUP, 0)
keyDown('enter')
keyUp('enter')
time.sleep(1)
print('over')
browser.close()