Skip to content

Instantly share code, notes, and snippets.

@joshstrupp
Last active June 18, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshstrupp/8b7568dbbdcfd6cd98b1e21b0aa639dd to your computer and use it in GitHub Desktop.
Save joshstrupp/8b7568dbbdcfd6cd98b1e21b0aa639dd to your computer and use it in GitHub Desktop.
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