Help!

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hamp Offline
Member
Posts: 58
Joined: Jul 2008
Reputation: 0
Question  Help!
Post: #1
Code:
<GetDetails>
            <RegExp input="$$1" output="&lt;url function=&quot;GMA&quot;&gt;http://api.themoviedb.org/2.0/Movie.search?title=\1&api_key=57983e31fb435df4df77afb854740ea9&lt;/url&gt;" dest="5+">
                <expression>&lt;span style=&quot;font-size:13px;color:#666&quot;&gt;([^&lt;]+)&lt;/span&gt;</expression>
            </RegExp>

            <RegExp input="$$1" output="&lt;url cache=&quot;KinoPoisk_opa.html&quot; function=&quot;GetFanart&quot;&gt;http://www.kinopoisk.ru/&lt;/url&gt;" dest="5+">
                <expression></expression>
            </RegExp>
            <expression noclean="1"></expression>
        </RegExp>

    </GetDetails>



    <GMA dest="10">
            <RegExp input="$$1" output="&lt;url function=&quot;GMFFS&quot;&gt;http://www.themoviedb.org/movie/\1/backdrops&lt;/url&gt;" dest="5+">
                <expression>&lt;id&gt;([^&quot;]+)&lt;/id&gt;</expression>
            </RegExp>
    </GMA>
    
    <GMFFS dest="7" clearbuffers="no">
        <RegExp input="$$1" output="&lt;thumb&gt;http://www.themoviedb.org/image/backdrops/\1&lt;/thumb&gt;" dest="6+">
            <expression repeat="yes" noclean="1">&lt;a href=&quot;/image/backdrops/([^&quot;]+)&quot;</expression>
        </RegExp>
    </GMFFS>


    <GetFanart dest="5">
        <RegExp input="$$6" output="&lt;details&gt;&lt;fanart&gt;\1&lt;/fanart&gt;&lt;/details&gt;" dest="5">
            <expression noclean="1"></expression>
        </RegExp>
    </GetFanart>

Not work! Why? Empty.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #2
apart from the obvious errors; (missing tags, missing expressions);

you are writing xml so you have to escape special chars. in addition you are outputting xml so you have to escape chars yet another time; in particular
Code:
<RegExp input="$$1" output="&lt;url function=&quot;GMA&quot;&gt;http://api.themoviedb.org/2.0/Movie.search?title=\1&api_key=57983e31fb435df4df77afb854740ea9&lt;/url&gt;" dest="5+">
needs to read
Code:
<RegExp input="$$1" output="&lt;url function=&quot;GMA&quot;&gt;http://api.themoviedb.org/2.0/Movie.search?title=\1&amp;amp;api_key=57983e31fb435df4df77afb854740ea9&lt;/url&gt;" dest="5+">

the & -> &amp;amp;

hint; open the xml in e.g. firefox. it will tell you exactly where the error is at
(This post was last modified: 2009-02-25 14:51 by spiff.)
find quote
hamp Offline
Member
Posts: 58
Joined: Jul 2008
Reputation: 0
Post: #3
Thank you. It really works.
find quote