How to submit a form using httpurlconnection?

How do I submit a form using the Python script?

Jonathan Revell Hopkins at Quora Visit the source

Was this solution helpful to you?

Other answers

I suggest that you read more about urllib2. I think you should find a good and simple starting point at the link below: [code]http://www.pythonforbeginners.com/python-on-the-web/how-to-use-urllib2-in-python/%5B/code%5D [/code] For the purpose which you want to use it for, you must refer to the stack overflow page that I have provided the link for, below: Python and urllib2: how to make a GET request with parameters Coming to the second part of your question, its not about the captcha in case of Facebook. Facebook uses a bit more advance technology to prevent the sort of events you're trying to accomplish. The exact term for what you are trying to do, is Cross-Site-Request-Forgery (CSRF). Most websites send a hidden token along with every form that they generate in order to avoid such attacks. Since, the browser now has a unique token that is random and is generated over and over again every time the form is demanded for (the page is reloaded and the website is opened), there is a very less chance that you'll be able to get that exact same token under normal circumstances. If you are still able to retrieve that token, the the two links I have mentioned above should be sufficient for you to test security. I hope that helps. If there are anymore doubts please let me know.

Purnesh Tripathi

http://stackoverflow.com/questions/17509607/submitting-to-a-web-form-using-python Check here the solution for your problem.Hope it helps.

Amit Choudhary

Try to get the url on which they hit the form and then hit it(In php similarĀ  often used is curl for this things) Secondly you can use API for that by making app in developers section in facebook.

Shivdhwaj Pandey

API with auth from an approved developer ID on FB. No captchas required. Are you trying to build a Bot? Don't do that...

Ajish George

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.