I building Kodi addon. I'm using python 2.7 and XML files. I have something like this. This is a simple regex:
<item>
<title>Hello</title>
<link>http://helloworld.com/something.m3u8/$doregex[time]</link>
<regex>
<name>time</name>
<expres><![CDATA[(?m)\.js\?time=([0-9]+)]]></expres>
<page>https://example.com/embed/3GhdKDSh/</page>
<referer>https://example.com/embed/3GhdKDSh/</referer>
<agent>Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0</agent>
<cookieJar><cookieJar>
</regex>
With this regex, I got time from page example.com/embed/3GhdKDSh in realtime.
But I want temporary save my regex result (I get this value example: 1662868347)
And I want to call later for the final results:
saved.time = $doregex[time] // 1662868347
<item>
<title>Hello</title>
<link>http://helloworld.com/something.m3u8/saved.time</link>
</item>
How to do that?
I also see some people use <expres>$pyFunction:</express> and maybe this is a idea?