this is my code:
import os,sys
import random
import webbrowser
import time
import subprocess as sp
cls=os.system("cls")
title=os.system('title Hit any key to start searhing!')
while True:
cls
print ""
title
raw_input()
getRandEntry()
def getRandEntry():
theFile = open("wordlist.txt","r")
wordList = theFile.readlines()
theRandoms = []
theRandoms.append(random.choice(wordList)) * 4
startLink(theRandoms)
return theRandoms
def startLink(theRandoms):
child = sp.Popen(['firefox', '-p', 'myprofile', '-no-remote', 'http://swagbucks.com/?t=w&p=1&q=' + str(theRandoms)])
time.sleep(15)
child.terminate() #where taskkill for python goes
for interval in range(180, 481): #180 seconds = 3 mins, 480 seconds = 8 min
#for loop is to make the random 3min-8min interval between searches
time.sleep(interval)
getRandEntry()
I think I passed the variable theRandoms to the second function correctly but im not sure i need the return statement.
can someone tell me how to make this code work because its not working. also if possible how to make it a bit more effecient because i think my code is crap right now :/