vbscript中的网页下载自动化

时间:2022-10-12 18:42:14

How would you automate logging into a website and downloading a page using vbscript?

您如何自动登录网站并使用vbscript下载页面?

3 个解决方案

#1


Using the MSXML.XMLHTTP-object to first do a POST to login and then add the cookie-headers to a GET request.

使用MSXML.XMLHTTP对象首先执行POST登录,然后将cookie标头添加到GET请求。

#2


As a quick and dirty solution, you could use a Shell object with SendKeys and Run as demonstrated here. These functions are quite powerful for those situations where you just can't the right object or library to use...

作为一个快速而肮脏的解决方案,您可以使用带有SendKeys和Run的Shell对象,如此处所示。对于那些你无法使用正确的对象或库的情况,这些函数非常强大......

#3


Well the script (given on link )works fine if you open the notepad and don't change the focus to other window. If you change the focus above script doesn't work.

那么脚本(在链接上给出)如果打开记事本并且不将焦点更改为其他窗口,则工作正常。如果更改上面的焦点脚本不起作用。

#1


Using the MSXML.XMLHTTP-object to first do a POST to login and then add the cookie-headers to a GET request.

使用MSXML.XMLHTTP对象首先执行POST登录,然后将cookie标头添加到GET请求。

#2


As a quick and dirty solution, you could use a Shell object with SendKeys and Run as demonstrated here. These functions are quite powerful for those situations where you just can't the right object or library to use...

作为一个快速而肮脏的解决方案,您可以使用带有SendKeys和Run的Shell对象,如此处所示。对于那些你无法使用正确的对象或库的情况,这些函数非常强大......

#3


Well the script (given on link )works fine if you open the notepad and don't change the focus to other window. If you change the focus above script doesn't work.

那么脚本(在链接上给出)如果打开记事本并且不将焦点更改为其他窗口,则工作正常。如果更改上面的焦点脚本不起作用。