Stack Exchange
Not getting the correct response In BeautifulSoup parsing
I have a form in this site : http://cib.cf.ocha.ac.jp/bitool/MIX/
I want to submit the form and obtain the result(which I will parse to get the specific content) in python, so I am using urllib and BeautifulSoup (newbie in BeautifulSoup). My Code is as follows:
from bs4 import BeautifulSoup;
import urllib;
import urllib2;

post_parameters = {

'methods':'CF',
'aasequence':'EEEEEEEEEEEEEEEEEEE'
}
post_arguments = urllib.urlencode(post_parameters);
url = 'http://cib.cf.ocha.ac.jp/bitool/MIX/MIX.php';
request = urllib2.Request(url,post_arguments);
#response = urllib.urlopen(url,post_arguments);
response = urllib2.urlopen(request);

the_page = response.read();
soup=BeautifulSoup(the_page);
print soup; 

But the response it is generating is not having the contents in the pre tag which is there when I manually submit the form using the browser. The second pre tag in the document should have a formatted string.
Can anyone point out the mistake?

How is it different? (and arhghghghhghghghhg to the semi colons :))

@JonClements actually the response I am getting in the python code doesn't have anything in the pre tag where I expect the output. (sorry for the semicolons; I am from the C++ background and new to python)

Feel free to [edit] your question to include that fact, and it'd be useful to include what result you do expect....

The site uses checkboxes to be able to select methods and uses a name of methods[] for the form element... Change your post_parameters to:
post_parameters = {    
    'methods[]':'CF',
    'aasequence':'EEEEEEEEEEEEEEEEEEE'
}

