ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.54k stars 1.14k forks source link

headless mode is 400 error #1941

Open gaocheng001 opened 1 month ago

gaocheng001 commented 1 month ago
    options = undetected_chromedriver.options.ChromeOptions()
    options.add_argument("--headless")
    driver = uc.Chrome(version_main = 119,headless=True,  options=options)
    driver.get('https://etax.beijing.chinatax.gov.cn/xxmh/html/index.html')
    for log in logs:
        print(log)
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources/skin/images/foot_logo.png - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475207}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/tax-images/login/loginimg.png - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475208}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources/skin/images/icons/pj.png - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475209}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/tax-images/common/logintop.png - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475209}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/layui/lay/modules/layer.js - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475213}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/tax-js/multi-session.js - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475214}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/viewsControlController/getGolobalTitle.do?z69aMLtT=0YPrkrqlqErXeFVjbtIJecp89WOMXfEnODbKVi7m64mHnUmLIRtUwEkKtJFFQqorQh.VtEWSrS.3i5.eGHXiEn6YXNvbGFYc8 - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475214}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/yyzxn-cjpt-web/yyzx/qjss/getCygn.do?z69aMLtT=0DQpx_AlqErXeFVjbtIJecp89WOMXfEnODbKVi7m64mHnUmLIRtUwEWrTo67gUSB._bxXOovmT.wjIGJdrAinHkAoooUQt675 - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475228}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/guideOnline/getUrl.do?z69aMLtT=0ctf76alqErXeFVjbtIJecp89WOMXfEnODbKVi7m64mHnUmLIRtUwGAkWA2btjDp4Z3BtxR.fYKGL6_2J4R7gqMu.GGRwX320yQAUjmBr4NPzPoFRpfkk9LgsO0jxtZ9tzOMYqrcpsufiUfqOH6kiCxCXAsC09f3CQHo4WqEe4X3bOq_6bVN_UzljZfWAQuw6Xa_b8rfxVD1C8xPOyHW92p1CKP5fpHZDDxUz31AW7Se0c6i_L3vSbpjrta_hNhWxRf0p8XUTNs7pUkfakNcQNNdhQ.efdYV4yG6bNovOMakaZWCTJKokhl7Jk9gFWMJMAIo.0gU5uzTXjFLTyGjEzW_lpRHUWjK1t1G1skIIctVfKI862E2gSHCt32ai7MrFaszbSUvmMU1v - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475234}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/yyzxn-cjpt-web/yyzx/qjss/showRelatedWord.do?z69aMLtT=09ytvcGlqErXeFVjbtIJecp89WOMXfEnODbKVi7m64mHnUmLIRtUwEmkW5jiNMDD98r2KFV9EXYqPjgaU21Hrm624b5TnSl4z - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475234}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/layui/lay/modules/form.js - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475245}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources/images/common/favicon.ico - Failed to load resource: the server responded with a status of 400 (Bad Request)', 'source': 'network', 'timestamp': 1720529475699}
{'level': 'SEVERE', 'message': 'https://etax.beijing.chinatax.gov.cn/xxmh/resources4/layui/layui.js 1:563 "Layui hint: layer is not a valid module"', 'source': 'console-api', 'timestamp': 1720529479028}
sunstep commented 1 month ago

Just a suggestion: try --headless=new instead