Author Topic: ImDB Raking  (Read 1352 times)

0 Members and 1 Guest are viewing this topic.

Cineman

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
ImDB Raking
« 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 ?


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: ImDB Raking
« Reply #1 on: July 08, 2014, 11:50:35 AM »
I haven't tested it exhaustively, but you can try:

Code: [Select]
<?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

  • Jr. Member
  • **
  • Posts: 12
  • Karma: 1
    • View Profile
Re: ImDB Raking
« Reply #2 on: July 08, 2014, 03:48:21 PM »
Thank you!
It works very well for me :)