-1
我想循環這個python腳本,所以我可以填寫表單無限次數。當我嘗試循環時,它只會從網站獲得一封確認的電子郵件。我的代碼有什麼問題?如何循環使用機械化的Python腳本?
import mechanize
#This bot allows for autofill on the ShoezGallery Raffle.
br = mechanize.Browser()
response = br.open("https://www.bstnstore.com/yeezy-boost-350-v2-zebra-raffle")
br.addheaders = [("User-agent","Mozilla/5.0")]
url = "https://www.bstnstore.com/yeezy-boost-350-v2-zebra-raffle"
br.select_form(nr=2)
emailAddress = 'my email'
br['EMAIL'] = emailAddress #DONT CHANGE
br['MMERGE3'] = emailAddress #DONT CHANGE
br.form.find_control(name="MMERGE4", kind="list").value = ["US 9.5 (EU 43 1/3)"]
br['FNAME'] = 'Julio'
br['LNAME'] = 'my last name'
br['MMERGE6'] = 'my phone number'
br['MMERGE5[addr1]'] = 'my address'
br['MMERGE5[addr2]'] = 'Floor 1'
br['MMERGE5[city]'] = 'my town'
br['MMERGE5[state]'] = 'my state'
br['MMERGE5[zip]'] = 'my zip'
br.form.find_control(name="MMERGE5[country]", kind="list").value = ["164"]
br.submit()
for i in range(1,1000000):
print 'Signed Up'