Page 1 of 1

[python][mysql][html] strange account problem

Posted: Sat Feb 15, 2014 10:03 am
by Isaac
I'm out of ideas. In truth, no one can help me. I'm just infinity frustrated.

I have a list of 16 accounts on a government website. My program loops through each account and grabs the payment history and puts it into my database, so I can answer questions to clients without having to log-on to a slow government site each time. This works for every single account except one, which makes absolutely no sense. 1. The login information is good. 2. The website is exactly the same for each account. 3. My python program shows is logging in correctly when using this bad account's info, but just can't find the "history" button just for that one account. How can this one client have a different page, when it can't possibly have a different page!?? I've even had python write out what it sees when it gets to that point and nothing looks wrong. Everything works fine on the other accounts! I'd already be developing a GUI for this program if I hadn't wasted so much time figuring out the problem with this one account.

Re: [python][mysql][html] strange account problem

Posted: Sat Feb 15, 2014 2:26 pm
by Jeff250
What are you using to parse the html?

Re: [python][mysql][html] strange account problem

Posted: Sun Feb 16, 2014 8:51 pm
by Isaac
from mechanize import Browser

Re: [python][mysql][html] strange account problem

Posted: Wed Feb 19, 2014 11:06 am
by Jeff250
I don't know what your debugging options are with that, but one thing you can try is if you have one page X that works and one page Y that inexplicably doesn't, then save them both to disk and just slowly modify page Y to look like X until Y works, and then you'll know what the relevant difference was. You can use, e.g., diff to identify the remaining differences.

Re: [python][mysql][html] strange account problem

Posted: Wed Mar 05, 2014 12:07 pm
by snoopy
Is the login for the bad account more complex than the others?

Maybe something along the way doesn't like a special character that's in the login for the bad account? Try changing the login & password so it's only alphanumeric? I've seen logins report a success but not really work when they choke on a character...

Re: [python][mysql][html] strange account problem

Posted: Sat Mar 08, 2014 2:18 pm
by Isaac
I changed the password to slightly shorter one. Now everything works. That makes absolutely no sense to me at all. 1. The old password worked. 2. Python/Mechanize shouldn't have a limit to form data submitted.