Jump to content

Saving DOM to file (_IE)


squirrel
 Share

Go to solution Solved by JohnOne,

Recommended Posts

Hi everybody,

I am new to AutoIt and already love it!

The situation

What I am currently trying to do is to crawl parts of a website. The site I am trying to crawl makes intensive use of Ajax to load additional content. I have written an AutoIt-script using the "_IE"-libraries, which fires these Ajax-content-load processes. Everything works fine and i can see the post-loaded HTML in the browser.

The Problem

But now I have the problem, that I cannot access the modified DOM-data. Just performing a "Save as..." via the file menu of the browser does not work, of course, since the modified DOM is ignored choosing this way.

The Question

What I am looking for is an approach to save/export/log the current DOM (or the single DOM changes) to the hard disk as a file.

I would be really happy, if somebody here has an idea!

Thank you very much in advance,

Chris

Link to comment
Share on other sites

Thank you JohnOne - that function works perfect!

I first use _IEBodyReadHTML to get the HTML of the current (modified) DOM and store it in a local variable. Then I simply write that variable to a file using FileWrite.

Edited by squirrel
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...