Last active
June 18, 2020 13:54
-
-
Save joshstrupp/8b7568dbbdcfd6cd98b1e21b0aa639dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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