# Send answer to web site done = fillpage.push_response(driver, values) if done: cleanup() driver.quit() break_CAPTCHA(url, speech_key, convert_key) else: #cleanup() #driver.quit() pass def cleanup(): args = ' '.join( ['rm', 'out.wav audio.mp3 Sounds/*.wav trash values.b' ]) subprocess.Popen(args, shell=True).wait() url = "http://webinsight.cs.washington.edu/projects/audiocaptchas/" url2 = "https://www.cybrary.it/register/" google_key = apiKey.getKey("Keys/google.key") convert_key = apiKey.getKey("Keys/cc.key") break_CAPTCHA(url, google_key, convert_key)
import Convert.convert as convert import Keys.apiKey as apiKey convert_key = apiKey.getKey("Keys/cc.key") convert.mp3_to_wav("audio.mp3", "out.wav", convert_key)