Open saitharun08 opened 1 year ago
Just to note, I did fix the invalid certificate error between selenium-wire and UC in #1503
Just to note, I did fix the invalid certificate error between selenium-wire and UC in #1503
Yes, it did resolve the invalid certificate error. However, Chrome continues to encounter issues when trying to retrieve the next page after initially landing on the home page.
Thank you for the response.
I also conquer the ERR_HTTP2_PROTOCOL_ERROR, @saitharun08 have you found a solution?
Overview
Please check the part of the code where it gets stuck at self._sock.recv_into(b)
Issues
Using selenium-wire
URL = 'https://example.com/home/'
def get_chrome_driver(proxy_info): chrome_options = Options() chrome_options.add_argument('--disable-popup-blocking') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument("--disk-cache-size=200000000") # limiting the cache storage to 200 MB options = { 'proxy': { 'http': 'http://%s' % proxy_info, 'https': 'http://%s' % proxy_info, 'no_proxy': 'localhost,127.0.0.1' } } driver = Chrome(seleniumwire_options=options, options=chrome_options) return driver
def get_case_details(chrome_driver): chrome_driver.get(URL) accept_button = chrome_driver.find_element(By.ID, 'ContentPlaceHolder1_ButtonAccept') accept_button.click() wait = WebDriverWait(chrome_driver, 40) case_number_field = wait.until(EC.element_to_be_clickable((By.ID, 'ContentPlaceHolder1_TextBoxCaseNumber'))) case_number_field.send_keys('54515') search_button = chrome_driver.find_element(By.ID, 'ContentPlaceHolder1_ButtonSearch') search_button.click() case_number_select = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, '.standardRow a'))) case_number_select.click() chrome_driver.refresh() chrome_driver.quit()
proxy_dict = {"proxy_ip": "000.00.0.00", "proxy_port": "0000", "proxy_username": "", "proxy_password": ""} proxy_info = '%s:%s@%s:%s' % (proxy_dict['proxy_username'], proxy_dict['proxy_password'], proxy_dict['proxy_ip'], proxy_dict['proxy_port']) chrome_driver = get_chrome_driver(proxy_info) get_case_details(chrome_driver)
import undetected_chromedriver as uc
def get_chrome_driver(proxy_dict): chrome_options = uc.ChromeOptions() chrome_options.add_argument('--disable-popup-blocking') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument("--disk-cache-size=200000000") # limiting the cache storage to 200 MB
authentiacting the proxy