Home › Forum › Omnis General Forum › Parsing OBrowser HTML content
-
Parsing OBrowser HTML content
Posted by Nathanaël on August 7, 2025 at 1:25 pmHi all.
Is there a way to get and/or parse the HTML content of a page displayed in a OBrower component?
(thick O$11 client on Windows).Doug Easterbrook replied 1 day, 17 hours ago 3 Members · 3 Replies -
3 Replies
-
Hi Nathanaël,
You could read the URL and use the HTTPParse, HTTPPage or any of those commands. Alternatively you can use the HTTP client worker object and fire up a get to the URL.
Best,
Andreas
-
Thanks Andreas, that’s a good idea but the content of the webpage we are trying to parse is dependant on a previous visit (information stored in a cookie), and OBrowser and the HTTP object don’t share those 😉
-
-
There are many ways to skin the cat.
since its in obrowser, you have the URL (as Andreas says). I get the feeling that it was a web page that was rendered by you, since you say that you may know the contents.
I was not aware that you couldn’t get cookies from obrowser, but if you re-read the web page using the omnis http commands using the URL in the $currentURL (as I recall), you should be able to retrieve the page a second time, within omnis.
I had a look at methods and properties, and I didn’t see anything that would let you get the actual HRML content after rendering.
anyway, if you can get the HTML content, but no cookies, then make your own equivalent.
within the html, you can add any amount of comments you want. such as
and so you can tag it such as
so, now all you need to do is stick encrypted string after that ‘comment:’ .. then read it, find it, and decrypt it.
Its like having hidden variables in the html code that meet the structure you want.
I am only suggesting this way …. since I don’t know about cookie retrieval from oBrowser. I don’t know why you couldn’t, and may have to ask for an enhancement …. But the comments thing might work in the meantime if it duplicates the cookie
Log in to reply.