kjpolker Posted September 13, 2021 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"?
Solution Gianni Posted September 13, 2021 Solution Posted September 13, 2021 _StringBetween returns an array.... MsgBox(0, "Title", $data[0]) Leendert-Jan and kjpolker 2 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
kjpolker Posted September 13, 2021 Author Posted September 13, 2021 I have no words... Thank you for pointing out a small but impactful detail I overlooked...
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