Developers
Forum
Index >> Widget showcase >> Automatic parser
#1 2008-02-15 20:50:41
- Twisterss

- Member
Hi,
I've made a widget to parse information on any webpage :
- enter the URL of your webpage
- select the information you are interested in (one block or many blocks on the same type) on the preview of the page
- see if the widget selects really what you want
- confirm
=> The widget displays the information you want, and refreshs it automatically every 20 minutes.
http://twisterss.free.fr/api_netvibes/p … arser.html
It works a bit like the WOD (Widget on demand) of webwag, but the information is selected directly in the DOM of the page.
I have tested it in netvibes, igoogle and standalone and it seems to work. But there are sometimes problems to display properly the CSSs. If you find pages with problems, please let me know.
I think that sometimes the widget says that there is nothing to display while it's false. If you encounter this error too, please tell me...
The widget is hosted by free.fr, so don't worry if you see 500 errors, just retry...
Offline
#3 2008-02-15 22:34:32
- Docgalaad

- Member
Most of my widgets do that. I usually test the captured content first. And if things are not correct, i simply dont refresh the widget content and wait for the next tick.
Also, never render the head block. Especially the meta tags, they mess with the top page (aka netvibes) and the favicon, targeting, etc.
I use XPath cause i love that techno. Unfortunatly, IE browsers dont like it.
That's a shame ![]()
Good work on yours though.
Offline
#4 2008-02-16 15:53:28
- Twisterss

- Member
I've modified the widget.
It doesn't render the head any more (replaced by parsing with regular expressions).
It still renders the whole page to display the blocks you are interested in. I don't know how to change that.
Offline
#5 2008-02-16 20:43:37
- Docgalaad

- Member
Your block highlighting technique is impressive. You accomplished a nice work with this little widget. I'm pretty sure it will have a great success. As is, it already renders nice services.
Offline
#6 2008-02-24 13:08:48
- Twisterss

- Member
Hi,
I've added some functions to the widget.
- it is able to remember the items you have already read and show the number of unread items (like the RSS reader) (only possible if there are links in every items you have selected)
- you can share a link if you use netvibes ginger and if the item contains only one link
- you can search in the items with the seach box in netvibes
I haven't been able to catch the event when you reset the number of unread items by clicking on the link in the tile of your widget or your tab. This is bad because if you refresh the widget, the number of unread messages comes back. Do you know a way to do that ? I've tried the callback onResetSearchResultCount but it doesn't work ![]()
Offline
#8 2008-02-25 12:27:14
- Twisterss

- Member
I wanted to write onResetUnreadCount, not onResetSearchResultCount.
Anyway ... it works now.
Offline
1
