本帖最后由 pcl_test 于 2017-5-25 00:28 编辑
回复 8# 523066680
辛苦了;w;虽然我绝对不会用这种方式读页面内容
获取加密链接- Set ie = CreateObject("InternetExplorer.Application")
- ie.Visible = true
- ie.navigate "https://privnote.com/#dont_ask"
-
- On Error Resume Next
- Set btn=ie.Document.getElementByID("encrypt_note")
- Do while Err
- On Error Resume Next
- Set btn=ie.Document.getElementByID("encrypt_note")
- WSH.Sleep 500
- Loop
-
- ie.Document.getElementByID("note_raw").value="需加密的内容"
- btn.click()
-
- Do while ie.Document.getElementByID("note_link_input").value = ""
- WSH.Sleep 500
- Loop
- msgbox ie.Document.getElementByID("note_link_input").value
- ie.quit
复制代码 获取解密内容- Set ie = CreateObject("InternetExplorer.Application")
- ie.Visible = true
- ie.navigate "https://privnote.com/3OZyRIdB#eCqP3Bxu5"
-
- On Error Resume Next
- Set textarea=ie.Document.getElementByID("note_contents")
- Do while Err
- On Error Resume Next
- Set textarea=ie.Document.getElementByID("note_contents")
- WSH.Sleep 500
- Loop
-
- Do while textarea.value = ""
- WSH.Sleep 500
- Loop
-
- msgbox textarea.value
- ie.quit
复制代码 直接这样就OK了(不知道为什么Chrome浏览器访问时元素内容是加密后的,而IE是直接的解密内容...害我折腾一个下午) |