login - log into website using mechanize and cookielib in python -


i working on scraping project trying scrape library information website: http://www.americanlibrarydirectory.com.

friday (after frustration) wrote following code, worked.

def scrape_alpha():     cj = cookielib.cookiejar()     br = mechanize.browser()     br.set_cookiejar(cj)     br.open("http://www.americanlibrarydirectory.com/login.asp")     br.select_form(name="form1")     br.form['username'] = 'myemailaddress'     br.form['password'] = 'mypasscode'     br.submit()     print(br.response().read())     alpha_url = "http://www.americanlibrarydirectory.com/browse.asp?query=a"     r = br.open(alpha_url).read()     soup = beautifulsoup(r) 

now cam project today , despite fact code worked last week, not working today, , don't have faintest idea how start figuring out wrong- doesn't give me error messages, not log in , remain on log-in page.

if try log in manually (not in code) works, don't believe issue email/password not correct or account has expired. have advice on should try do?