url = 'http://www.indiapost.gov.in/pin/'
f = myopener.open(url)
soup = BeautifulSoup(f)
viewstate = soup.select('#__VIEWSTATE')[0]['value']
eventvalidation = soup.select('#__EVENTVALIDATION')[0]['value']
formData = ('__EVENTVALIDATION', eventvalidation), ('__VIEWSTATE', viewstate
    ), ('__VIEWSTATEENCRYPTED', ''), ('txt_offname', ''), ('ddl_dist', '0'), (
    'txt_dist_on', ''), ('ddl_state', '1'), ('btn_state', 'Search'), (
    'txt_stateon', ''), ('hdn_tabchoice', '1'), ('search_on', 'Search')
encodedFields = urllib.parse.urlencode(formData)
f = myopener.open(url, encodedFields)
try:
    fout = open('tmp.html', 'w')
except:
    print('Could not open output file\n')
fout.writelines(f.readlines())
fout.close()
отправить запрос с использованием python на страницу asp.net