6
我正嘗試使用Mechanize在此page上提交一個表單。使用python修復網頁的字符編碼機械化
br.open("http://mspc.bii.a-star.edu.sg/tankp/run_depth.html")
#selecting form to fill
br.select_form(nr = 0)
#input for the form
br['pdb_id'] = '1atp'
req = br.submit()
然而,這提供了以下錯誤
mechanize._form.ParseError: expected name token at '<! INPUT PDB FILE>\n\t'
我想,這是因爲一些錯位的字符編碼(ref)。我想知道如何解決這個問題。