mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2019
Posts: 1
I
isi1dur Offline OP
Mostly harmless
OP Offline
Mostly harmless
I
Joined: Dec 2019
Posts: 1
i'm trying to make a tvmaze.com lookup script, but I keep bumping my head and now I need your help smile

The script is fairly simple - it uses $urlget, and $bvar, but it doesn't reply what I expect. I had it output the correct data once, but then I tried to filter the info, and now it only replies with numbers.

Script is:

Code
alias tvmaze-lookup {
  $urlget(http://api.tvmaze.com/singlesearch/shows?q= $+ $1-,gb,&tvmaze-info,tvmaze-output)
}
alias tvmaze-output {
  echo -a $bvar(&tvmaze-info,-1).text
}


I would expect an output like this when I do a /tvmaze-lookup Made in Chelsea

Code
[11:52] {"id":831,"url":"http://www.tvmaze.com/shows/831/made-in-chelsea","name":"Made in Chelsea","type":"Reality","language":"English","genres":[],"status":"Running","runtime":60,"premiered":"2011-05-09","officialSite":"http://www.channel4.com/programmes/made-in-chelsea","schedule":{"time":"21:00","days":["Monday"]},"rating":{"average":null},"weight":91,"network":{"id":41,"name":"E4","country":{"name":"United Kingdom","code":"GB","timezone":"Europe/London"}},"webChannel":null,"externals":{"tvrage":28201,"thetvdb":248888,"imdb":"tt1933854"},"image":{"medium":"http://static.tvmaze.com/uploads/images/medium_portrait/6/15775.jpg","original":"http://static.tvmaze.com/uploads/images/original_untouched/6/15775.jpg"},"summary":"<p>A look at the lifestyles of a group of 20-something residents of the exclusive postcode in London, Chelsea, SW3.</p>","updated":1576506643,"_links":{"self":{"href":"http://api.tvmaze.com/shows/831"},"previousepisode":{"href":"http://api.tvmaze.com/episodes/1776412"},"nextepisode":{"href":"http://api.tvmaze.com/episodes/1776413"}}}


but all I get is

Code
977


What am I doing wrong?

Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Code
alias tvmaze-output {
  echo -a $bvar(&tvmaze-info,1-).text
}

Changed the -1 into 1-.


Link Copied to Clipboard