Jump to content

Getting source code of a website using IE.au3


lucas9
 Share

Recommended Posts

i am using IE.au3 in order to get the source code of a website. this is my code:

local $html = _IEDocReadHTML($oIE)
FileWrite("C:\\test.txt",$html & @CRLF)

 

if i open internet explorer and i click right mouse button -> "view source code of the page" the code shown is different than the code shown by autoit script.

¿anyone knows any solution? ¿am i using the right function?

 

Regards and thanks

Link to comment
Share on other sites

Are you sure that the URL that you are viewing matches what is in the autoit script exactly?  If not, I would update the autoit script with the URL you copy and paste from the page whose source files you are viewing and try again. What parts are different? To troubleshoot the issue, I would copy the source code that you are seeing when you select "view source code of the page" and paste that into a seperate txt file and save it, then use a file comparison application to compare the two files to see exactly what content is not being read by autoit.

Link to comment
Share on other sites

1 minute ago, Chimp said:

InetGet() saves the returned data in a disk file; You can also use InetRead() if you want returned data stored in a variable instead...

hehe. just now i was writing code in order to put the code given by InetGet() in a variable.

 

THX

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...