VoxCommando Forum

Help and Support (Using VoxCommando) => VoxCommando Basics and Core Features => Topic started by: Cineman on July 08, 2014, 11:30:31 AM

Title: ImDB Raking
Post by: Cineman on July 08, 2014, 11:30:31 AM
i would like to srape the raking of the movies from imdb.com
as a movie fan it would be great to say to vox. ´what is the ranking of ....., and get an Answer.
Because i only watch movies higher then 5.2 points

any Ideas how to make it ?

Title: Re: ImDB Raking
Post by: nime5ter on July 08, 2014, 11:50:35 AM
I haven't tested it exhaustively, but you can try:

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.0-->
<command id="177" name="scrape imdb ratings" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
 <action>
   <cmdType>Scrape</cmdType>
   <params>
     <param>http://www.google.com/search?q=imdb+{1}&amp;btnI</param>
   </params>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>Results.RegEx</cmdType>
   <params>
     <param>"ratingValue"&gt;(.*?)&lt;</param>
   </params>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>OSD.ShowText</cmdType>
   <params>
     <param>The movie {1} has an IMDB rating of {Match.1}.</param>
   </params>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <action>
   <cmdType>TTS.Speak</cmdType>
   <params>
     <param>The movie {1} has an IMDB rating of {Match.1}.</param>
   </params>
   <cmdRepeat>1</cmdRepeat>
 </action>
 <phrase>What's the I M D B ranking of</phrase>
 <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>


Of course, this requires that VC understand the name of the movie you're saying. If there's a reasonable way for you to create a movie payload xml file that contains the titles you'd be interested in (for example, scraping a site that has the movies you're thinking about watching and creating a payload xml file from that), that would be more reliable.
Title: Re: ImDB Raking
Post by: Cineman on July 08, 2014, 03:48:21 PM
Thank you!
It works very well for me :)