我正在尝试使用Python登录网站,但在我为urllib
获取的html源代码中不包含登录表单,我已经通过chrome检查,它也显示了相同的HTML代码。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>cApexWEB 1.1</title>
</head>
<frameset border=false frameborder=0 framespacing=0>
<frameset>
<frame name="main" src="capexmain_middle.htm" scrolling="no" target="_top">
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn\'t support them.</p>
</body>
</noframes>
</frameset>
</html>
一些现代网站使用动态内容加载来从外部认证服务加载登录表单。您可以使用Selenium来模拟浏览器并绕过此问题。你找到了详细的介绍和解释here。