kjpolker Posted September 13, 2021 Share Posted September 13, 2021 I am trying to obtain the title of web pages using _INetGetSource but I can not return the string, so I guess this is more of a _StringBetween question. #include <String.au3> #include <Inet.au3> test() While 1 Sleep(100) WEnd Func test() $data = BinaryToString(_INetGetSource("https://www.autoitscript.com/forum/")) ClipPut($data) ;Using to paste in notepad to verify source is correct $data = _StringBetween($data, "<title>", "</title>") ;Find title of URL between <title> tags MsgBox(0, "Title", $data) ;Returns blank result EndFunc Below is a snapshot of the first two lines of the source, pasted directly from clipboard: Why is it not getting the string "Forums - AutoIt Forums"? Link to comment Share on other sites More sharing options...
Solution Gianni Posted September 13, 2021 Solution Share Posted September 13, 2021 _StringBetween returns an array.... MsgBox(0, "Title", $data[0]) kjpolker and Leendert-Jan 2 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
kjpolker Posted September 13, 2021 Author Share Posted September 13, 2021 I have no words... Thank you for pointing out a small but impactful detail I overlooked... Link to comment Share on other sites More sharing options...
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