curl error code 22 when querying THEMOVIEDB.ORG
#1
I'm using the following XML in GetDetails:

<RegExp input="$$1" output="&lt;url function=&quot;GetTMDBID&quot;&gt;http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=\1&amp;year=1995&lt;/url&gt;" dest="5+">
<expression>&lt;span class="Gray"&gt;In English:&lt;/span&gt;\s*([^&lt;]*)</expression>
</RegExp>

In XBMC,log I get:

22:06:58 T:4728 DEBUG: CurlFile::Open(0A6C3870) http://api.themoviedb.org/3/search/movie...query=Dead Man&year=1995
22:06:59 T:4728 WARNING: XFILE::CCurlFile::CReadState::FillBuffer: curl failed with code 22
22:06:59 T:4728 ERROR: CCurlFile::CReadState::Open, didn't get any data from stream.
22:06:59 T:4728 ERROR: ADDON::CScraper::Run: Unable to parse web site

I want to mention that output from other calls using the meta.common.themoviedb.org add-on show up in the log succesfully, before my failed direct URL call.
Reply
#2
Might be because the query term wasn't url-encoded (this is a guess).

Try adding encode="1" into the expression.

e.g.
Code:
<RegExp input="$$1" output="&lt;url function=&quot;GetTMDBID&quot;&gt;http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=\1&amp;year=1995&lt;/url&gt;" dest="5+">
<expression encode="1">&lt;span class="Gray"&gt;In English:&lt;/span&gt;\s*([^&lt;]*)</expression>
</RegExp>

(Probably wouldn't hurt to throw a trim="1" in there as well just in case.)
Reply
#3
(2013-02-17, 01:55)scudlee Wrote: Might be because the query term wasn't url-encoded (this is a guess).

Try adding encode="1" into the expression.

e.g.
Code:
<RegExp input="$$1" output="&lt;url function=&quot;GetTMDBID&quot;&gt;http://api.themoviedb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=\1&amp;year=1995&lt;/url&gt;" dest="5+">
<expression encode="1">&lt;span class="Gray"&gt;In English:&lt;/span&gt;\s*([^&lt;]*)</expression>
</RegExp>

(Probably wouldn't hurt to throw a trim="1" in there as well just in case.)

Thanks, it worked!
Where can I find documentation about this stuff?
Reply

Logout Mark Read Team Forum Stats Members Help
curl error code 22 when querying THEMOVIEDB.ORG0