Web爬网期间不维护登录状态

时间:2020-09-04 02:58:37

标签: excel vba authentication web-crawler

我是Excel VBA和Python的初学者。 尽管python是用于网络抓取的更强大的工具,但我需要使用VBA来做到这一点。

我想在登录网站时获取信息。 我照做,

Dim IE As New SHDocVw.InternetExplorer

IE.Visible = True
IE.navigate "URL(arbitrary)"

Do While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE
Loop


'Next step: Login to website
  'In this step, Instead of whole code, I briefly explain.
  'Input my ID and PW by .value, and use .click method to login button
  'then login is successfully done.


'Next step: then browse IE to desired URL, which contains desired information in that website.

IE.navigate "other URL(arbitrary)"

'My problem is: In this step, IE says that i am not logged on.

我想知道如何保持登录状态。 如果对于初学者来说,这不是一件简单的事情,请告诉我要学习什么以解决VBA中的登录问题。

0 个答案:

没有答案