XWidgetSoft Forum
https://www.bbs.xwidget.com/

Limit in WebParserCore / Starting a widget
https://www.bbs.xwidget.com/viewtopic.php?f=3&t=2582
Page 1 of 1

Author:  jackiD [ February 9th, 2013, 9:59 pm ]
Post subject:  Limit in WebParserCore / Starting a widget

Hello Tony,

after playing with WebParserCore, it seems there is a limit of 99 RegEx matches.(?)
In my opinion that is very restrictive and too low.

I created a football widget, with results and ranking table.

Example: English premier league (20 teams)

99 RegEx matches divided by 20 = 4.95 => 4 RegEx matches per team.
"Ranking position" and "team name" already take 2 RegEx matches, so there are only 2 RegEx matches left.

Usualy you will have at least these basic informations:
1. position
2. team name
3. matches played
4. won
5. draw
6. lost
7. points
8. goals
9. goal difference

9 x 20 = 180 RegEx matches (for basic infos)

I also wanted to grab a betting table (35 members/lines). Same trouble... because then you only can get 2 RegEx matches per member (position, name), so neither the points for the current day nor the points overall :(

Would it be possible to increase this limit to at least 256 (or even better 1024)?
Is there any other solution?
(In the first step I was thinking to grab line by line and to use the substitute function for replacing HTML-tags with tabulators but I could not manage that either)

And another short question:

How can I start a widget from inside a widget?
(Button in "Widget_A" should start "Widget_D" at position x,y on the screen)

Author:  Sooner266 [ February 22nd, 2013, 2:28 am ]
Post subject:  Re: Limit in WebParserCore / Starting a widget

I agree, more would be nice. But for huge feeds I prefer using a RegExp object in Javascript. You hand it the RSS source and the regex parser, and it returns an array of all the matches. I also converted that into a two dimensional array using nested loops for easier manipulation. I used a webparsercore to grab the whole RSS feed off the net, then fed it to the RegExp object. The skin I'm working on once pulled in over 2500 matches and it worked fine. (It'll be called Steam Specials or something like that, if you want to see the code when I release it soon.)
RegExp object docs: http://www.w3schools.com/js/js_obj_regexp.asp

And for your last question, there's actually a single function that does exactly that:
startupWidget(string widgetPath, int X, int Y);

Author:  jackiDi [ March 5th, 2013, 2:40 am ]
Post subject:  Re: Limit in WebParserCore / Starting a widget

Sooner266 wrote:
startupWidget(string widgetPath, int X, int Y);
Works like charm, many thanks for this :)

I'm not an expert on JavaScript. Before I was using "Samurize" with the wonderful PageScraper plugin to create my widgets and with that it was really easy and flexible to parse and filter the information I'd like to have without "programming".
Anyway, I would be very happy if I could migrate my Samurize widgets to Xwidget, and if it needs JavaScript to do it, well then it has to be that way.
I don't know if you are willed to publish your "Steam Special" widget and if I would be able to use it as a kind of skeleton for my own webparsing stuff.
Maybe a simple widget (JavaScript/Regex) as an example could already help me, which then I could extend.

Author:  Tony [ March 5th, 2013, 4:47 am ]
Post subject:  Re: Limit in WebParserCore / Starting a widget

Hello jackiD,

Thanks for your feedback, I will increase this limit to 256 in next version v1.82. will be release in this week.

Tony

Author:  jackiDi [ March 5th, 2013, 5:00 am ]
Post subject:  Re: Limit in WebParserCore / Starting a widget

Wonderful news and many thanks, Tony :)

Author:  meme [ March 20th, 2013, 3:06 pm ]
Post subject:  Re: Limit in WebParserCore / Starting a widget

Quote:
(It'll be called Steam Specials or something like that, if you want to see the code when I release it soon.)

Very interested to see, thank you.. Can you let us know when you release it ?

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/