![]() Registered Member ![]()
|
What I want to do is to load a webpage (an online dictionary), find a special element (the part containing the translation/description), cut it out and then run a few regexes on that.
So I guess what I need is some way of getting the inner html of an object on a webpage based on its id or xpath. If I were in a browser I could just use getElementById or something similar but here... Any ideas? Some library I could use? |
![]() Administrator ![]()
|
You should be able to use Qt's QWeb* API's to achieve this, or potentially QDomDocument.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thank you.
But how do I access those from my javascript plasmoid? |
![]() Administrator ![]()
|
I am not sure if the appropriate API's are exposed via Javascript. With C++ at least, you can have a look at the Web Slice applet to see how it renders sections of a page.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Ok, thanks for your help.
I don't think they are exposed, tried to use them before and it didn't work. Guess I have to change to C++. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient