News:

HOT TIP! Exploring the commands packaged in VC's standard configurations is a great way to learn how to build your own. You can also clone a command as a starting point: just right-click and select "Clone" (or type Alt-C).

Main Menu

ImDB Raking

Started by Cineman, July 08, 2014, 11:30:31 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Cineman

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 ?


nime5ter

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.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Cineman

Thank you!
It works very well for me :)