urllib + Microsoft VBScript

M

mag_dex

Hi,
I have a problem, I wanna write script to get result from web tools
http://202.120.37.186/bioinf/Gpos/index.htm
I created script like this:
#!/usr/bin/python

import urllib

def do_GposLoc(job_id,v=1):
seqOfProtein = """>P46748""".strip() + '\r\n'
seqOfProtein +=
"""MKTLSILDTIIKIPEKIEIHPTTTEYIYTITGPLGSSSINLKKLDKNGIACINFDIQNKQ
VLIRSLYPKYNGLYKKLIENKFLGVSRGFCVYLEIVGVGYRAALLSSSLQNSTKDTNDTI
VLKLGHSHDIHYKVPNGVRVFLQSPSEICIFGVDLNQVTQVAHSIRNTRPPSVYKGKGIR
YTNEKIVTKTGKRK
"""
#
print seqOfProtein
address= "http://202.120.37.186/bioinf/Gpos/Gpos-PSLPred-
upload.asp?act=upload"
params = urllib.urlencode(
{'mode': 'string',
'S1':seqOfProtein,
'B1': 'Submit'})
#
f = urllib.urlopen(address, params)

content = f.read()
if v:print content
return 0

if '__main__'==__name__:
job_id='f'
do_GposLoc(job_id)



and I got result like this:
<font face="����" size=2>
<p>Microsoft VBScript ����������</font> <font face="����" size=2 >
���� '800a03f6'</font>
<p>
<font face="����" size=2>ȱ�� 'End'</font>
<p>
<font face="����" size=2>/iisHelp/common/500-100.asp</font><font
face="����" size=2>����242</font> <font face="����" size=2>
<p>Microsoft VBScript ����ʱ����</font> <font face="����" size=2 > ����
'800a0005'</font>
<p>
<font face="����" size=2>��Ч�Ĺ��̵��û�����: 'right'</font>
<p>
<font face="����" size=2>/bioinf/Gpos/Gpos-PSLPred-upload.asp</
font><font face="����" size=2>����21</font>

Yeah, I know these strange chars it's from wrong codding.
But I can't get the same result as I would post it 'by hand' opening
http://202.120.37.186/bioinf/Gpos/index.htm
i submit the sequence:
MKTLSILDTIIKIPEKIEIHPTTTEYIYTITGPLGSSSINLKKLDKNGIACINFDIQNKQ
VLIRSLYPKYNGLYKKLIENKFLGVSRGFCVYLEIVGVGYRAALLSSSLQNSTKDTNDTI
VLKLGHSHDIHYKVPNGVRVFLQSPSEICIFGVDLNQVTQVAHSIRNTRPPSVYKGKGIR
YTNEKIVTKTGKRK

Maybe sb has idea how to solve this problem.
Regards
Marcin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,732
Latest member
ArronPalin

Latest Threads

Top