gruntydatsun Posted November 22, 2012 Posted November 22, 2012 (edited) I'm trying to scrape the rendered text from inside a frame in IE with no success. Can someone please help?CODE OF THE PAGE I'M TRYING TO SCRAPE<html><head><meta name=vs_targetSchema content="HTML 4.0"><title>Updating Display</title> <!--Updating Display-- EOL--></head><frameset id=toggler framespacing=0 frameborder="1" cols="0%,100%"><frameset id=filtersframe framespacing=0 frameborder="1" rows="90%,10%"><frame id="AvailableFilters" name="AvailableFilters" src="AvailableFilters.asp?D=Reporter_Agent_Display|PRIAACC|PRIAACC|5&DT=StandardAgent&CF=&S=0|0&TA=2" marginwidth="0" marginheight="0" scrolling=auto frameborder="yes" noresize="noresize" title="Realtime Hidden"><frame id="FiltersFrameMessages" name="FiltersFrameMessages" src="../PrivateDisSave.asp" marginwidth="5" marginheight="0" scrolling=no frameborder="yes" noresize="noresize" title="Realtime Hidden"></frameset><frame id="DisWithFilters" name="DisWithFilters" src="StdDisplay.asp?D=Reporter_Agent_Display|PRIAACC|PRIAACC|5&DT=StandardAgent&CF=&S=0|0&TA=2&ServerType=1" marginwidth="5" marginheight="0" scrolling=auto frameborder="no" noresize="noresize" title="Realtime Hidden"></frameset></html>AUTOIT I'M USING TO TRY AND GET TO THE RENDERED TEXT OF THE PAGE#include <IE.au3> Local $oIE = _IEAttach("Reporter Agent Display") Local $oFrames = _IEFrameGetCollection($oIE) Local $iNumFrames = @extended For $i = 0 To ($iNumFrames - 1) Local $oFrame = _IEFrameGetCollection($oIE, $i) MsgBox(0, "Frame Info", _IEPropertyGet($oFrame, "innertext")) NextAny help would be greatly appreciated.ERROR AUTOIT THROWS WHICH MAKES ME WANT TO WEEP LIKE A CHILDC:Program FilesAutoIt3IncludeIE.au3 (2849) : ==> The requested action with this object has failed.:$oTemp = $o_object.document.body$oTemp = $o_object.document^ ERROR Edited November 22, 2012 by gruntydatsun
DaleHohm Posted November 26, 2012 Posted November 26, 2012 Use _IEDocReadHTML Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now