How can you use Python to fill out HTML forms that also have Javascript?

I am making a python program that automatically enters information into a form on a website. I looked at a module called mechanize at first but then I realized that it didn't support javascript. Is there any way to take a piece of information and insert it into a "form" on a website that uses javascript? The website I am using is If you login and then go to a place/business page like this, then you will see a bunch of spots that need to be filled in. I looked at the page source and this "form" uses javascript. I just need a way to fill in those blanks now. Like I said, I tried mechanize and it didn't work but I also googled it and got nothing. The "form" uses "onclick" If you could offer any advice, I would really appreciate it. Thanks.
To really do this you need an environment that makes the page think it's really in a web browser. Generally that's sufficiently hard that people go the route of harnessing an actual browser somehow.

以上就是How can you use Python to fill out HTML forms that also have Javascript?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准