Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headless mode is 400 error #1941

Open
gaocheng001 opened this issue Jul 9, 2024 · 1 comment
Open

headless mode is 400 error #1941

gaocheng001 opened this issue Jul 9, 2024 · 1 comment

Comments

@gaocheng001
Copy link

gaocheng001 commented Jul 9, 2024

    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
Copy link

sunstep commented Jul 17, 2024

Just a suggestion: try --headless=new instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants