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

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

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

Post 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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

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

Post by Jeff250 »

What are you using to parse the html?
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

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

Post by Isaac »

from mechanize import Browser
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6511
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

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

Post 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.
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4435
Joined: Thu Sep 02, 1999 2:01 am

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

Post 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...
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
User avatar
Isaac
DBB Artist
DBB Artist
Posts: 7649
Joined: Mon Aug 01, 2005 8:47 am
Location: 🍕

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

Post 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.
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-★ ·:*¨༺꧁༺ :E ༻꧂༻¨*:·.★-⎽__⎽-⎻⎺⎺⎻-⎽__⎽--⎻⎺⎺⎻-
❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉❉⊱•═•⊰❉⊱•═•⊰❉⊱•═•⊰❉
Post Reply