在使用selenium chrome驱动程序时无法加载网页,并且尝试了多年的解决方案,需要新的解决方案

uqxowvwt  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(326)

我需要帮助使用python selenium chrome驱动程序构建一个绕过gumtree.com.au登录页面的机器人。当chrome驱动程序转到指定页面时
https://www.gumtree.com.au/t-login-form.html
它不加载任何内容,只是一个空白的白页。但是,当我手动将其插入任何浏览器时,它的加载效果都非常好。我根本无法使用selenium chrome驱动程序登录并加载它,我尝试过更改标题,使用headless驱动程序,并使用vim全局更改所有cdc_uuu文本(是的,它是正确的,我已进行了三次检查)。
使用了此useragent类(实际上必须导入包fake useragent):

from fake_useragent import UserAgent

无头驱动程序片段:

options.add_argument(f'user-agent={random_header}')
options.add_argument("--window-size=1920,1080")
options.add_argument('--ignore-certificate-errors')
options.add_argument('--allow-running-insecure-content')
options.add_argument("--disable-extensions")
options.add_argument("--proxy-server='direct://'")
options.add_argument("--proxy-bypass-list=*")
options.add_argument("--start-maximized")
options.add_argument('--disable-gpu')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--no-sandbox')
options.add_argument(f"user-agent={random_header}")

两个问题:
我该怎么办?也可以使用其他自动化工具。
如果不是所有站点,如何构建一个未被发现的机器人?尤其是那些试图防止刮伤的人(我不是刮伤,我只是假设他们得到的是最坏的)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题