Web自动化-处理.aspx [英] Web Automation - Dealing with .aspx

查看:45
本文介绍了Web自动化-处理.aspx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现一些自动化,包括在网页上提交表单.表单的值已经在列表中的每个项目中进行了编码.

I'm trying to accomplish a little bit of automation which includes submitting a form on a webpage. The values for the form are already coded per item in the list.

我用Python尝试了许多不同的模块,但似乎没有任何答案.我没有访问Visual Basic的权限,而且我个人以前从未处理过.aspx页.这是表格名称当我找到表单的参数时,我以为我已经准备好了并准备出发:函数ShowEditForm(id,param1,param2,param3,param4)#为安全起见,删除了实际的参数名称

I've tried many different modules with Python and nothing seems to give me an answer. I don't have access to Visual Basic and I've personally never dealt with .aspx pages before. This is the Form name And I thought I was set and ready to go when I found the parameters for the form: function ShowEditForm(id, param1, param2, param3, param4) #actual parameter names removed for security

这是最让人头疼的部分:

And this is the part that's the major headache:

<INPUT id=__EVENTTARGET type=hidden name=__EVENTTARGET> <INPUT id=__EVENTARGUMENT     type=hidden name=__EVENTARGUMENT> <INPUT id=__VIEWSTATE type=hidden value=/wEPDw... #This     continues for 800+ characters

我相信这是导致我的代码失败的原因,我是否在进行巫术追捕,试图以python发布到.aspx表单?

I believe this is the cause of my failure of code, am I on a witchhunt trying to post to an .aspx form in python?

谢谢

推荐答案

,您需要解析/参数化您的帖子标题和内容.这可能是不平凡的.

you would need to parse/parameterize your post headers and contents. this can be non-trivial.

检出机械化以便在HTTP级别进行访问,并具有一些表单处理上的便利.

check out mechanize for access at the HTTP level, with some form handling convenience.

签出,以在Python中驱动真正的浏览器.

check out selenium, for driving a real browser in Python.

这篇关于Web自动化-处理.aspx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆