How do I submit a form using the Python script?
-
For example, consider Facebook Security check, assume I know the captcha then how can I submit it to Facebook servers?
-
Answer:
You probably need to generate an XHTTP request with Python. It looks like you can use Python's httplib (https://docs.python.org/2/library/httplib.html). You'll need to also figure out the right requests and URLs to use with Facebook. Read through Facebook's API documentation to figure it out. (https://developers.facebook.com/docs/facebook-login/v2.0 API). Specifically, take a look at their documentation on https://developers.facebook.com/docs/facebook-login/access-tokens.
Jonathan Revell Hopkins at Quora Visit the source
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:
- How to submit a form using httpurlconnection?Best solution by stackoverflow.com
- If I have a form, such as an application, how can I fill it out using my computer?Best solution by answers.yahoo.com
- How can I edit a picture using photoshop?Best solution by Yahoo! Answers
- How can I record a video using my webcam?Best solution by Answerbag.com
- How do I send a message using yahoo mail?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.