I was trying to submit details through python on a form on the following website.
I tried requests but there is a search box on the site as well(another form).
How do I handle this? Sample data - TIN - 27680809621V
I was trying to submit details through python on a form on the following website.
I tried requests but there is a search box on the site as well(another form).
How do I handle this? Sample data - TIN - 27680809621V
Try selenium or BeautifulSoup libraries
Try using Mechanize, a library that supports interacting with forms, links and others when crawling or scraping data.
Something like this would be enough:
import mechanize
br = mechanize.Browser()
br.open('http://mahavat.gov.in/Tin_Search/Tinsearch.jsp')
br.select_form('f1')
br.form['tin'] = '27680809621V'
br.submit()
Here are some examples from StackOverflow on how to use Mechanize to fill forms: