首页 > 解决方案 > 这个 HTML method = "POST" 标签是如何工作的?

问题描述

我最近开始了一个项目,该项目打算从某个站点下载一些数据。不幸的是,当我想用​​ r.text 下载 html 时,我得到了这段代码,而不是我期望的代码:

<html>

<head>
    <title>Working...</title>
</head>

<body>
    <form method="POST" name="hiddenform" action="some link"><input type="hidden" name="wa" value="wsignin1.0" /><input type="hidden" name="wresult" value="some links tokens and certificates" /><input type="hidden" name="wctx" value="some link" /><noscript><p>Script is disabled. Click Submit to continue.</p><input type="submit" value="Submit" /></noscript></form>
    <script language="javascript">
        window.setTimeout('document.forms[0].submit()', 0);
    </script>
</body>

</html>

当我在 webbrowser 中打开这个 html 代码时,它会将我重定向到某个站点。

我可以使用可以像这样工作的python请求模块发送请求吗?


如果我解释得不够充分,我会很感激在评论中写出来。

标签: javascriptpythonhtmlpython-requestspython-requests-html

解决方案


推荐阅读