Sign in to follow this  
Followers 0
charon

Does _INetGetSource or _IEDocReadHTML work with secure sites

4 posts in this topic

I am trying to view the source code from a secure site: Just trying to extract the download link but my code fails

#include <Inet.au3>
#include <IE.au3>

;~ $test = "https://www.java.com/en/download/manual.jsp"
;~ $string=_INetGetSource($test)
;~ $result = StringInStr($string, "Download Java software for Windows (64-bit)")
;~ MsgBox(0, "", "Results: " & $string)

;~ Local $oIE = _IE_Example("https://www.java.com/en/download/manual.jsp")
;~ Local $sHTML = _IEDocReadHTML($oIE)
;~ MsgBox(0, "Document Source", $sHTML)
;a title="Download Java software for Windows (64-bit)" href="http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385">

$oIE = _IECreate("https://www.java.com/en/download/manual.jsp", 0, 0)
$sString = _IEBodyReadHTML($oIE)
MsgBox(0, "Document Source", $sString)

Share this post


Link to post
Share on other sites



It works for me. The Msgbox display the source when I'm running the code

Share this post


Link to post
Share on other sites

So when I run it under windows 7 I just get autoit icon on the taskbar. When I click it nothing happens. I just tried it in Windows XP and it works. I tried it on a 2nd windows 7 PC and it doesn't work.  just not showing me the msgbox window.  I can continue without that window

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

that will produce some large msgbox on win7

code returned from page can be diffrent on diffrent ie versions so try it like this and youl see that you will get your msgbox (there are faster wayes to strip that chars if needed but for fun they are in loop)
 

$oIE = _IECreate("https://www.java.com/en/download/manual.jsp")

$sString = _IEBodyReadHTML($oIE)
Do
    $sString = StringReplace($sString,' ','')
Until @extended = 0
Do
    $sString = StringReplace($sString,@LF&@LF,@LF)
Until @extended = 0
MsgBox(0,'',$sString)
ConsoleWrite($sString)

anyway ConsoleWrite can still display the source with no replaces, so its probably some msgbox limit or something...

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0