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

NetFlix

Started by Haddood, October 10, 2014, 05:30:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haddood

Quote from: jitterjames on January 28, 2015, 02:46:46 PM
I just signed up for Netflix (one month free), started playing a movie in robobrowser, went fullscreen (via the fullscreen button in the Silverlight player) then tested with DxInput to pause and play by emulating spacebar.  Worked perfectly on the first try.


then maybe you can the commands a try and give me some feedback to improve 'em  8) 8)

Quote
You need to enable the dxInput plugin.  Also, I set my keypress delay to 60ms.  I did not test with lower values but it might not work if you set it too low.  60 milliseconds usually works well.

Aaaaahhhhh,  I had it set at 0 (not sure if it is the default thing in the plug in, if it is maybe you can do it to be 60 for newbees like me, who never read the wiki :))
When Voice command gets tough, use hand gestures

PegLegTV


PegLegTV

@haddood I've been trying to get a new Netflix setup together for when I upgrade to windows 10, but being that Netflix did a major update to the layout of the windows 10 app its more difficult then I would prefer, so I thought I would give yours another look and see how yours works,

and I was wondering if you have figured out a way for basic (up, down, left, right) navigation in the browser?

I did some testing and tried using the Div IDs but it appears that Netflix is using dynamic Div to prevent the items from using the same Div id every time, so this method fell short of basic navigation

but I did have an idea of possibly creating a command that would allow chromecast like capability of sending the Netflix video from android or other PC to VC and have it launch the video in Robob, but haven't fully decided yet.

Haddood

I haven't done much to it since then.... we use Netflix most of the time with Xbox these days... However I will try to take a look at it again ...
It has been a long time in my head to built a "my library" and "previously viewed" locally saved pages by scraping info from Netflix ... So this might a good time to look at it ...
When Voice command gets tough, use hand gestures

PegLegTV

#19
quick update:

I was able to figure out a way for basic navigation for the most part  :yay, except for making the rows scroll with the left and right movement but it does appear to be working and I think it looks good to

execute the command "Launch Netflix / Windowed" to launch netlfix

you may have to login or select your profile with your mouse on first launch

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<commandGroup open="True" name="Netflix Nav" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1150" name="Launch Netflix / Windowed" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Fullscreen</cmdType>
      <params>
        <param>False</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>www.netflix.com</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>title-card-1-0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMud</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMlr</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="1159" name="Netflix UP" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMlr</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={Var.NMud}-1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMud</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>title-card-{Var.NMud}-0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then />
      <else>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result={Var.NMud}+1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>NMud</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Top of the page</param>
            <param />
            <param>-1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Netflix UP</phrase>
  </command>
  <command id="1164" name="Netflix DOWN" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMlr</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={Var.NMud}+1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMud</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>title-card-{Var.NMud}-0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then />
      <else>
        <action>
          <cmdType>PY.ExecString</cmdType>
          <params>
            <param>result={Var.NMud}-1</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>NMud</param>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>OSD.ShowText</cmdType>
          <params>
            <param>Bottom of the page</param>
            <param />
            <param>0</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Netflix DOWN</phrase>
  </command>
  <command id="1180" name="Netflix left" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={Var.NMlr}-1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMlr</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>title-card-{Var.NMud}-{Var.NMlr}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then />
      <else>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>NMlr</param>
            <param>0</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.ElementByID</cmdType>
          <params>
            <param>title-card-{Var.NMud}-{Var.NMlr}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Netflix left</phrase>
  </command>
  <command id="1153" name="Netflix RIGHT" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>result={Var.NMlr}+1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>NMlr</param>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByID</cmdType>
      <params>
        <param>title-card-{Var.NMud}-{Var.NMlr}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then />
      <else>
        <action>
          <cmdType>Results.SetVar</cmdType>
          <params>
            <param>NMlr</param>
            <param>0</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.ElementByID</cmdType>
          <params>
            <param>title-card-{Var.NMud}-{Var.NMlr}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Click</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <phrase>Netflix RIGHT</phrase>
  </command>
  <command id="1227" name="Netflix Close" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Dispose</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Netflix Close</phrase>
  </command>
</commandGroup>


because of the way that its navigating the page I have it jump straight to the first row of videos, I also have it popup an OSD when it reaches the top row of videos and bottom row of videos

when navigating up and down it will automatically jump to the first poster in the next row instead of going straight down

After a lot of testing I found that Div is not going to work at all but I did some more digging and found that there is an Element ID called "title-card-*-*"

The First * is the row number and the second * is the "card" number

my next step will be to see if right and left navigation will still work if the rows scroll with the movement,

Haddood

When Voice command gets tough, use hand gestures

PegLegTV