我正在尝试使用关键字“现场音乐”搜索http://www.wegottickets.com/ 。但是返回的结果仍然是主页,而不是包含大量现场音乐信息的搜索结果页面。谁能告诉我问题是什么?
from urllib2 import urlopen
from ClientForm import ParseResponse
response = urlopen("http://www.wegottickets.com/")
forms = ParseResponse(response, backwards_compat=False)
form = forms[0]
form.set_value("Live music", name="unified_query")
form.set_all_readonly(False)
control = form.find_control(type="submit")
print control.disabled
print control.readonly
#print form
request2 = form.click()
try:
response2 = urlopen(request2)
except:
print "Unsccessful query"
print response2.geturl()
print response2.info()
print response.read()
response2.close()
非常感谢!