Alexxander Posted May 5, 2014 Posted May 5, 2014 hi all im using inetread but it is getting me the source of the page , is their is a way to only get the text that a normal user see when he visit the site? i dont want the source code
Moderators JLogan3o13 Posted May 5, 2014 Moderators Posted May 5, 2014 (edited) Do you mean something like _IEBodyReadText? InetRead is for a file, not a site. Edited May 5, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Alexxander Posted May 5, 2014 Author Posted May 5, 2014 JLogan3o13 it seems that _IEBodyReadText is only for getting text from already opened ie i want to get text from a site for example "facebook.com" when i use inetread("facebook.com") i get the source code of the page. i want to get the text in that webpage "Connect with friends and thFind more of what you're looking for with Graph Search"
Palestinian Posted May 5, 2014 Posted May 5, 2014 (edited) InetRead returns the source of the page if its directed to it, the source after all is a file. unless you meant something else. EDIT: here you go #include <IE.au3> $oIE = _IECreate("facebook.com") $oText = _IEGetObjById($oIE, "pagelet_bluebar") ConsoleWrite($oText.innertext & @CR) Edited May 5, 2014 by Palestinian
Moderators JLogan3o13 Posted May 5, 2014 Moderators Posted May 5, 2014 (edited) I personally only use it for reading files, have never simply pointed it at the URL to get source (silly me I use _INetGetSource for that). I would think the easiest way is with _IEBodyReadText, and make the window invisible if you want: #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("www.autoitscript.com", 0, 0) Local $sText = _IEBodyReadText($oIE) MsgBox($MB_SYSTEMMODAL, "Body Text", $sText) _IEQuit($oIE) I am sure someone much smarter than I will wander along, and may have another way of doing it. Edit: Or if the window is already open: #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IEAttach("http://stevedonovan.github.io/winapi/api.html", "url", 1) Local $sText = _IEBodyReadText($oIE) MsgBox($MB_SYSTEMMODAL, "Body Text", $sText) _IEQuit($oIE) Edited May 5, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Palestinian Posted May 5, 2014 Posted May 5, 2014 _INetGetSource uses InetRead to return the source of the page, not so silly after all.
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