Help with custom function
#1
Hi, i am working on one scrapper witch is provide imdbid. I need to use it in custom function to call url: http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=$$8 and then from this url save seriesid to the db. In variable $$8 there is saved returned and corect imdb id.

I dont know how to write custom function and how to save seriesid to the db. My container destination for details is "4+".

Any help?
Reply
#2
What you need to do is add:
Code:
<url function="GetTVDBId">http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=$$8</url>
to your details output (obviously, you can use whatever function name you want).

i.e. something like:
Code:
<RegExp input="" output="&lt;url function=&quot;GetTVDBId&quot;&gt;http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=$$8&lt;/url&gt;" dest="4+">
    <expression/>
</RegExp>

Then, separate from the <GetDetails> function, you'd have your custom function:
Code:
<GetTVDBId dest="4">
    <RegExp input="$$3" output="&lt;details&gt;\1&lt;/details&gt;" dest="4">
        <RegExp input="$$1" output="&lt;id&gt;\1&lt;/id&gt;" dest="3">
            <expression>...</expression>
        </RegExp>
        <expression noclean="1"/>
    </RegExp>
</GetTVDBId>
(Where the "..." is the regex to capture the tvdb id.)
Reply
#3
I try it, but not works. I think there is somethink bad with my input and dest values. I was try to change it but no effect. Look at this:

Code:
<GetDetails dest="3">
    <RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
      <!-- title -->
      <RegExp input="$$1" output="&lt;title&gt;\1&lt;/title&gt;" dest="4+">
        <expression>&lt;cz&gt;([^&lt;]*)&lt;/cz&gt;[^&lt;]*&lt;en&gt;([^&lt;]*)&lt;/en&gt;</expression>
      </RegExp>
.....
      <RegExp input="" output="&lt;url function=&quot;GetTVDBId&quot;&gt;http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=$$8&lt;/url&gt;" dest="4+">
      <expression/>
      </RegExp>
    <expression noclean="1"/>
  </RegExp>
</GetDetails>
and function:
Code:
<GetTVDBId dest="3">
      <RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
          <RegExp input="$$1" output="&lt;id&gt;\1&lt;/id&gt;" dest="4">
              <expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
          </RegExp>
          <expression noclean="1"/>
      </RegExp>
  </GetTVDBId>
Reply
#4
First step would be to turn on debug logging, scan something and then check the log. Either it's calling the function, but the function isn't working, or it's not calling the function.

Specifically, you'd be looking for:
Code:
DEBUG: scraper: GetDetails returned <details><title>...</title>...<url function="GetTVDBId">http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=...</url></details>
DEBUG: scraper: GetTVDBId returned <details><id>...</id></details>

If the <url> is missing from the GetDetails line, try replacing the empty input with something non-empty (e.g. $$1 or $$8). I'm fairly sure it works with empty input, but doesn't hurt to be careful.

If the <url> is there but the log complains about the function being missing, you've placed the function somewhere weird.

If the GetTVDBId line is there, but the id isn't returned, then the regex is wrong. (It isn't wrong, though.)
Reply
#5
I found error, it was here:
Code:
<RegExp input="$$1" output="&lt;id&gt;\1&lt;/id&gt;" dest="8">
        <expression>&lt;imdb&gt;([^&lt;]*)&lt;/imdb&gt;</expression>
      </RegExp>
output have to be just \1

Thanks for help
Reply
#6
I have another one problem. I am trying to load thumbs, posters, fanarts from TVDB but other info from another site. How to do it? I was trying to add some lines from tvdb scrapper but not succesfull.
All this i am trying to add to the function described in posts up.
Here is complete function:
Code:
<GetTVDBId dest="4">
    <RegExp input="$$3" output="&lt;details&gt;\1&lt;/details&gt;" dest="4">
        <RegExp input="$$1" output="&lt;id&gt;\1&lt;/id&gt;" dest="3">
            <expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
        </RegExp>
        <expression noclean="1"/>
    </RegExp>

<RegExp input="$$1" output="&lt;url cache=&quot;cache-\1$$4.xml&quot;&gt;http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=tt0412253&amp;language=$INFO[language]&lt;/url&gt;" dest="3">
    <RegExp input="$$2" output="%20(\1)" dest="7">
        <expression clear="yes">(.+)</expression>
    </RegExp>
    <expression/>
</RegExp>
<RegExp input="$$7" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;results&gt;\1&lt;/results&gt;" dest="1">
  <RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\3&lt;/title&gt;&lt;language&gt;\2&lt;/language&gt;&lt;url cache=&quot;\1-\2.xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/\2.zip&lt;/url&gt;&lt;id&gt;\1&lt;/id&gt;&lt;/entity&gt;" dest="7">
        <expression repeat="yes">&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;[^&lt;]*&lt;language&gt;([^&lt;]*)&lt;/language&gt;[^&lt;]*&lt;SeriesName&gt;([^&lt;]*)&lt;/SeriesName&gt;</expression>
    </RegExp>
    <expression noclean="1"/>
</RegExp>

        <RegExp input="$$7" output="&lt;thumb&gt;\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">(.+)</expression>
        </RegExp>
        
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;blank&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;&lt;/Language&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;poster&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
        </RegExp>
        <RegExp input="$$7" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;-1&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
            <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
        </RegExp>
        <RegExp conditional="fanart" input="$$7" output="&lt;fanart url=&quot;http://thetvdb.com/banners/&quot;&gt;\1&lt;/fanart&gt;" dest="4+">
            <RegExp input="$$7" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="7+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$7" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="7+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
            </RegExp>
            <expression noclean="1"/>
        </RegExp>
  </GetTVDBId>
Reply
#7
You need to have a new function and then do like you did to go from GetDetails to GetTVDBId: Grab the id value (now the tvdb id), and then call that function with the tvdb api URL using that id.

e.g. add this to GetTVDBId:
Code:
<RegExp input="$$1" output="&lt;url function=&quot;GetTVDBDetails&quot; cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;" dest="3+">
    <expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
</RegExp>

And then have a <GetTVDBDetails> function capture all the tvdb artwork (pretty much just copy GetDetails from the tvdb scraper and remove any irrelevant bits).
Reply
#8
Still not work, actual code:
Code:
<GetTVDBId dest="4">
    <RegExp input="$$3" output="&lt;details&gt;\1&lt;/details&gt;" dest="4">
        <RegExp input="$$1" output="&lt;id&gt;\1&lt;/id&gt;" dest="3">
            <expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
        </RegExp>
        <expression noclean="1"/>
    </RegExp>
    <RegExp input="$$1" output="&lt;url function=&quot;GetTVDBDetails&quot; cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;" dest="3+">
        <expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
    </RegExp>
  </GetTVDBId>
  <GetTVDBDetails dest="7">
    <RegExp input="$$4" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;details&gt;\1&lt;/details&gt;" dest="7">
            <RegExp input="$$1" output="\1" dest="5">
                <expression noclean="1">&lt;Series&gt;.*?&lt;id&gt;$$2&lt;/id&gt;(.*)</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;plot&gt;\1&lt;/plot&gt;" dest="4">
                <expression noclean="1">&lt;Overview&gt;([^&lt;]*)&lt;/Overview&gt;</expression>
            </RegExp>
            <RegExp input="$$2" output="&lt;id&gt;\1&lt;/id&gt;" dest="4+">
                <expression/>
            </RegExp>
            <RegExp input="$$1" output="&lt;mpaa&gt;\1&lt;/mpaa&gt;" dest="4+">
                <expression>&lt;ContentRating&gt;([^&lt;]*)&lt;/ContentRating&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;premiered&gt;\1&lt;/premiered&gt;" dest="4+">
                <expression>&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="4+">
                <expression>&lt;Rating&gt;([^&lt;]*)&lt;/Rating&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;studio&gt;\1&lt;/studio&gt;" dest="4+">
                <expression>&lt;Network&gt;([^&lt;]*)&lt;/Network&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;title&gt;\1&lt;/title&gt;" dest="4+">
                <expression>&lt;SeriesName&gt;([^&lt;]*)&lt;/SeriesName&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="\1" dest="10">
                <expression noclean="1">&lt;Genre&gt;([^&lt;]*)&lt;/Genre&gt;</expression>
            </RegExp>
            <RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
                <expression repeat="yes">([^\|]*)\|</expression>
            </RegExp>
            <RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
                <expression repeat="yes">([^,]*),</expression>
            </RegExp>
            <RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
                <expression>([^\|,]+)$</expression>
            </RegExp>
            <!-- actors with thumbs -->
            <RegExp input="$$5" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\3&lt;/role&gt;&lt;thumb&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;&lt;/actor&gt;" dest="4+">
                <expression repeat="yes" noclean="1,2,3">&lt;Actor&gt;.*?&lt;Image&gt;([^&lt;]+)&lt;/Image&gt;.*?&lt;Name&gt;([^&lt;]*)&lt;/Name&gt;.*?&lt;Role&gt;([^&lt;]*)</expression>
            </RegExp>
            <!-- actors without thumbs -->
            <RegExp input="$$5" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\3&lt;/role&gt;&lt;/actor&gt;" dest="4+">
                <expression repeat="yes" noclean="1,2,3">&lt;Actor&gt;.*?&lt;Image&gt;([^&lt;]*)&lt;/Image&gt;.*?&lt;Name&gt;([^&lt;]*)&lt;/Name&gt;.*?&lt;Role&gt;([^&lt;]*)</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;blank&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;&lt;/Language&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;poster&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
            </RegExp>
            <RegExp input="$$5" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;-1&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
                <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
            </RegExp>
            <RegExp conditional="fanart" input="$$7" output="&lt;fanart url=&quot;http://thetvdb.com/banners/&quot;&gt;\1&lt;/fanart&gt;" dest="4+">
                <RegExp input="$$5" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="7+">
                    <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
                </RegExp>
                <RegExp input="$$5" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="7+">
                    <expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
                </RegExp>
                <expression noclean="1"/>
            </RegExp>
            <RegExp input="$$3" output="\1" dest="6">
                <expression>.*/(.*).zip</expression>
            </RegExp>
            <RegExp input="$$3" output="&lt;episodeguide&gt;&lt;url cache=&quot;$$2-$$6.xml&quot;&gt;\1&lt;/url&gt;&lt;/episodeguide&gt;" dest="4+">
                <expression/>
            </RegExp>
            <expression noclean="1"/>
        </RegExp>
    </GetTVDBDetails>
Reply
#9
You need to move the added RegExp in GetTVDBId up a few lines. It needs to all be before the <expression noclean="1"/>.
Reply
#10
Great thanks. Now it works. You are best dude Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Help with custom function0