Is there a way to decode movie title from imdb which contains special chars?
#1
Hi spiff,

I've found some movies where the hdtrailers.net scraper library I submitted wasn't worked and I figured it happens when the movie title (hdtrailers.net is being searched by the title) contains special and/or international chars.

Further investigation showed that this is because the returned title from imdb is encoded "somehow". I don't even recognize what encode this is.

For example:
"Puskás Hungary" - Puskás Hungary
"World's Greatest Dad" - World's Greatest Dad

XBMC seems to read this code fine, because the title appears as it should in xbmc, but this obviously blocks using the title as a search string somewhere else.

Is there a way to decode this string within the scraper?

Thank you for your support in advance.
Reply
#2
to anyone looking for this feature: http://trac.xbmc.org/changeset/31124

thanks vdrfan for implementing this!

However it doesn't seem to work for me.

I have the following in the scraper:
Code:
<RegExp input="$$1" output="\1" dest="19">
<expression fixchars="1" trim="1" encode="1">&lt;h1&gt;([^&lt;]*)</expression>
</RegExp>

Code:
<RegExp input="$INFO[TrailerQ]" output="&lt;url function=&quot;Get480pTrailer&quot;&gt;http://www.hd-trailers.net/blog/?s=&quot;$$19%28Theatrical%20Trailer%29%22&lt;/url&gt;" dest="5+">
<expression>480p</expression>
</RegExp>

But in the log it seems the chars are not "fixed":
Code:
07:31:42 T:5532 M:1248747520   DEBUG: scraper: GetIMDBDetails returned <details><url function="Get480pTrailer">http://www.hd-trailers.net/blog/?s="World%26%23x27%3bs%20Greatest%20Dad%20%28Theatrical%20Trailer%29%22</url></details>

Do I use the fixchars tag incorrectly?

Thanks for your support in advance.
Reply
#3
problem was that fixchars ran after encode. fixed in r31174
Reply
#4
spiff Wrote:problem was that fixchars ran after encode. fixed in r31174

Thank you spiff, it's working now.
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a way to decode movie title from imdb which contains special chars?0