Recently, I'm trying to scrape a waterfall website through Selenium (request doesn't work and I can't get the API).
However, I came across a problem that I can't solve: Memory error.
Because using Selenium is really ram consuming, I had tried to appoint my USB function as cache through the following code
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument(r'--user-data-dir=F:\OuoC')
options.add_argument('--incognito')
options.add_argument('--disable-gpu')
driver = webdriver.Chrome(executable_path=r'C:\Users\user\Desktop\chromedriver.exe',options = options)
Yet, this failed to work. When I open my USB, though I saw the files added by selenium, chrome driver still consumes my computer's built in ram, and the files in USB weren't refreshing either(I had pressed f5).
Besides, my Anaconda prompt also shown the following message:
[10320:11384:0202/231331.035:ERROR:device_event_log_impl.cc(211)] [23:13:31.035] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection:
(0x1F)
[I 23:15:25.741 NotebookApp] Saving file at /play/ques.ipynb