Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84004

Sharing data between getSearchUrl and getDetails

$
0
0
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
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="&lt;title&gt;\1[$$7]&lt;/title&gt;&lt;originaltitle&gt;\1[$$7]&lt;/originaltitle&gt;&lt;year&gt;\2&lt;/year&gt;" dest="6">
    <expression trim="1" noclean="1">&lt;title&gt;([^&lt;]+)&lt;/title&gt;.*&lt;span class=&quot;date&quot;&gt;&lt;meta itemprop=&quot;startDate&quot; content=&quot;([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
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.

Viewing all articles
Browse latest Browse all 84004

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>