Hi,
I am writing an MMA scraper from sherdog.com
Is there any way I can set variable in the getSearchUrl function which I can later use in getDetails. For testing I tried:
Set buffer 7 in getSearchUrl
Append it to the title in getDetails
But the title is just getting [] appended to it. i.e. $$7 is the empty string.
So from this can I assume that all the $$ buffers are reset for each function call. e.g. $$1 is input parameter and all others are cleared (although $$2 is apparently used by some functions - doco?).
So is there any other way I can share this data? Other variable names? Is it even possible from a threading/control flow point of view?
Background: The reason I want this is that I sometimes have 2 for an MMA event. e.g.
So here I want to strip the -prelims from the search URL, and then append "prelims" back into the title. The stripping is working fine. The adding back is not because the buffer I stored it in is empty.
I am writing an MMA scraper from sherdog.com
Is there any way I can set variable in the getSearchUrl function which I can later use in getDetails. For testing I tried:
Set buffer 7 in getSearchUrl
Code:
<RegExp input="$$4" output=" BOGUS" dest="7">
<expression noclean="1" clear="yes"/>
</RegExp>
Append it to the title in getDetails
Code:
<RegExp input="$$1" output="<title>\1[$$7]</title><originaltitle>\1[$$7]</originaltitle><year>\2</year>" dest="6">
<expression trim="1" noclean="1"><title>([^<]+)</title>.*<span class="date"><meta itemprop="startDate" content="([0-9]+)</expression>
</RegExp>
But the title is just getting [] appended to it. i.e. $$7 is the empty string.
So from this can I assume that all the $$ buffers are reset for each function call. e.g. $$1 is input parameter and all others are cleared (although $$2 is apparently used by some functions - doco?).
So is there any other way I can share this data? Other variable names? Is it even possible from a threading/control flow point of view?
Background: The reason I want this is that I sometimes have 2 for an MMA event. e.g.
Code:
UFC-148.avi
UFC-148-prelims.avi