使用Selenium/undetected_chromedriver爬取MCA网站遇自动重定向问题
问题:使用Selenium/Undetected Chromedriver访问目标页面遭自动重定向
我在爬取https://www.mca.gov.in/content/mca/global/en/home.html网站时遇到以下问题:
- 使用Selenium或undetected_chromedriver打开目标页面https://www.mca.gov.in/content/mca/global/en/mca/master-data/MDS.html时,页面会自动重定向至首页,但用普通浏览器访问无此问题
- 已解决验证码相关问题,尝试过禁用锚标签等多种方案均无效,当前仅需实现成功停留在目标页面
以下是我的测试代码:
import undetected_chromedriver as uc import time driver = uc.Chrome() driver.get("https://www.mca.gov.in/content/mca/global/en/mca/master-data/MDS.html") time.sleep(10) driver.quit()
内容的提问来源于stack exchange,提问作者Yash
相关产品推荐
相关产品推荐

