View Full Version : Totally Lost
LiveRock
22nd May 2006, 09:47 AM
I have scripts that were running fine until today. I looked at the scripts and was totally bewildered. The documentation that comes with UnitMiner is not very clear.
Is there new documentation? The explanation on patterns and sections is very brief...
I need to know what is:
RegExp {:re(\s*)}<td rowspan="2"{:re([^>]*)}>{$time1:re([^.<]*)}.{$time2:re([^<]*)}
{:re(\s*)}{:re(\s*)}</td>\
It looks like an expression but what is {:re([^>]*)}
and ?
and {$time1:re([^.<]*)}
Also what is {:re(\s*)}
Hope someone would point me to the right direction...
HELP!!
vzeman
22nd May 2006, 08:51 PM
Hi.
all what is marked by {} stands as variable value, which will be filled in context variable after match
e.g. {$time1:re([^.<]*)} means, that all what will match by this construction will be stored to context variable "$time1"
definition of variable is divided into 2 parts in this case
first part is variable name and second part is definition of regular expression, which defines only which values will be match in this variable.
so most simple way for definition of variable is e.g. {$time}
in any example: <td>{$time}</td>
all what is between tags td will be stored into this variable
Character *? is something like wildcard and will match all characters until will be found character < (minimum match)
character ? is wildcard, but will match all characters, which are possible to match within patern
If you still don't understand, put here any example html code, which you need to parse and I can explain it to you on next example.
Or write to support@qualityunit.com and they will try to answer your questions too
LiveRock
13th June 2006, 02:31 PM
Thanks! Where can I find documentation on these? The PDF file that comes with UnitMiner does explain any of these....
And what is happening below?
<Pattern>
RegExp <td colspan="8" class="sports-text-white-bold">1X2</td>
</Pattern>
<Section While>
NoContext
Optional
<Pattern>
RegExp <tr align="center">{:re(\s*)}<td rowspan="{:int}"{:re([^>]*)}>{$day:int}/{$month:int}/{$year:int}</td>
Trim
</Pattern>
<Section While>
NoContext
Optional
EndAt <tr align="center">{:re(\s*)}<td rowspan="{:int}"{:re([^>]*)}>{:int}/{:int}/{:int}</td>
<Section>
Optional
NoContext
EndAt <tr align="center">{:re(\s*)}<td rowspan=
<Pattern>
RegExp {:re(\s*)}<td rowspan="2"{:re([^>]*)}>{$time1:re([^.<]*)}.{$time2:re([^<]*)}
{:re(\s*)}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$league:re([^<]*)}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$matchnumber:int}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$team1:re([a-zA-Z0-9 ]*)} vs {$team2:re([^<]*)}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$home:re([^<]*)}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$draw:re([^<]*)}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$away:re([^<]*)}</td>{:re(\s*)}</tr>\
{:re(\s*)}<tr align="center">{:re(\s*)}<td{:re([^>]*)}>{$homeo:real}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$drawo:real}</td>\
{:re(\s*)}<td{:re([^>]*)}>{$awayo:real}</td>{:re(\s*)}</tr>
Trim
</Pattern>
vzeman
13th June 2006, 02:50 PM
Hi.
I will try to comment this script, however, I don't know if it works, because I don't know on which HTML source you used that.
# {:re(\s*)} - match any number of white spaces
# {:int} - match any integer number
# {:re([^>]*)} - match anything except character <
# {$day:int} - match any integer number and store it to context variable $day
# {$month:int} - match any integer number and store it to context variable $month
# {$year:int} - match any integer number and store it to context variable $year
# {$time1:re([^.<]*)} - match anything except character . and < and store it to context variable $time1
# {$league:re([^<]*)} - match anything except character < and store it to context variable $league
# {$matchnumber:int} - match any integer number and store it to context variable $matchnumber
# {$team1:re([a-zA-Z0-9 ]*)} - match any number or any letter (lower or upper case) or space and store it to context variable $team1
# {$drawo:real} - match any real number and store it to context variable $drawo
I hope this explanation helped you a bit.
If you have any real problem with any script, please send it to our support and we will try to help you with any particular problem.
Viktor
kenlyle
8th August 2006, 02:21 AM
I just wanted to offer my opinion, which is that I think it's pretty cool that Quality Unit will answer questions like this when it's also part of their business plan to write scripts like this for a fee.
It's a tough balancing act. From the consumer side, you can buy pretty good Windows based extraction software that's easier to use for about $100, but then what have you got? Windows based software. I know my hosted dual Xeon server is much more reliable.
I think UM is a good value....and that's even after some missing files in the distribution cost me several hours...the script that Jan wrote for me is just excellent, and will be grabbing data for me for the next 16 hours, even after I turn my PC off.
Once UM Studio is fixed up a little, it should be a very powerful combination, and I look forward to it.
K
vzeman
8th August 2006, 08:24 AM
Hi Kenlyle.
Thank you for your opinion. We are happy, that we made product, which satisfied you.
Viktor
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.