Jump to content

How to read data from an actual page and parse it?


Marmo
 Share

Recommended Posts

Hello guys, this is my first post here so sorry if I made a mistake :/

 

I had no idea how to google this / search on forum, maybe its the language barrier or maybe I am just dumb.

I looked at the IE functions, but I can't find any that would just look at the current page (basically one that is already open on IE) and let me parse (is that the word?), basically look at the info/source/etc from an actual IE page open.

I saw many ways to do this using GUI functions or page requests inside autoit but I can't find anything related to parsing a current page to get current source code.

 

I know this is pretty vague, I am not even sure about what I am trying to do myself, so far I just want to read data from x page I am on, on IE, instead of reading data from X page using whatever autoit get-page IE plugin. Dont know if this makes sense, but basically I want to read code source from existing IE browser rather than read code source using autoit to acess a page. Im not sure this makes much more sense either, I used autoit here and there for random projects (on very small scales) for years, but this one is a bone I can't chew. Please help, if you understand my gibberish!

 

And sorry for those who don't, this might be the stupidest question of the year, maybe if I had changed 2 words on my google search I would have found it... it might just be the language barrier. Or my slowself. Pick your poison.

Link to comment
Share on other sites

Just an FYI: aside from Autoit...

 

all browsers nowadays have an inspect element function for web developers.

for instance in chrome if you right click anywhere on the page and choose "Inspect Element" you are given a pretty cool side window that allows you to peruse over the page and see what code is making it work.

Bill

 

p.s.  in IE its "Developer Tools" under the "Tools" menu or F12

Edited by l3ill
Link to comment
Share on other sites

Hi, 

_IEAttach will do this requirement. An example is provided below. For parsing the web source, use an appropriate IE function.

Run IE and navigate to www.autoitscript.com before executing the example.

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IEAttach("AutoIt")
MsgBox($MB_SYSTEMMODAL, "Web Source", _IEBodyReadHTML($oIE))

_IEQuit($oIE)

thanks

Anoop

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...