Python mechanize - submit custom form?

Parse the page, extract the elements you want, reform the page, and inject them back into mechanize.

Parse the page, extract the elements you want, reform the page, and inject them back into mechanize. For a project I worked on, I had to employ a simulated browser and found Mechanize to be very poor at form handling. It would yank uninterpreted elements out of Javascript blocks and die.

I had to write a workaround that used BeautifulSoup to strip out all the bits that would cause it to die before it reached the form parser. You may or may not run into that problem, but it's something to keep in mind. I ultimately ended up abandoning the Mechanize approach and went with Selenium.It's form handler was far superior and it could handle JS.

It's got its issues (the browser adds a layer of complexity), but I found it much easier to work with.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions