Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from roku import Roku;
import time;
import random;
with open("/Users/josh/Desktop/1-1000.txt") as f:
wordlist = []
for line in f:
wordlist.append(line.strip())
roku = Roku('10.0.0.54');
netflix = roku['Netflix'];
netflix.launch();
# roku.current_app --> potential future while loop; if loop = expected app, end
# Wait for profile screen.
time.sleep(15);
# Select first profile.
roku.select();
# land on last show, go back to main menu
time.sleep(2);
roku.back();
# navigate to left nav bar
time.sleep(2);
roku.left();
# go up to search
time.sleep(2);
roku.up();
# select search
time.sleep(2);
roku.select();
# enter search term
time.sleep(2);
roku.literal(random.choice(wordlist));
#go down to suggestions
time.sleep(2);
roku.down();
#go down past suggestions
time.sleep(2);
roku.down();
#hover first movie
time.sleep(2);
roku.select();
#select first movie
time.sleep(2);
roku.select();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment