Ejemplo n.º 1
0
	def __init__(self, param={}):
		self.conf = {
			'url':'http://zthf'+'tech.eic'+'p.net:180/',
			'encoding':'utf-8',
			'image_base':'R:/',
			'action_login':string.Template('portal/workflow/login.wf'),
			'action_login_referer':'portal/index_blue.jsp',
			'action_msglist':string.Template('portal/workflow/login.wf?sid=$sid&cmd=Navigation_Frame_Main&systemId=21'),
			'action_msglist_referer':string.Template('portal/workflow/login.wf?sid=$sid&cmd=Navigation_Frame_Top&systemId=21'),
			'action_msglist2':string.Template('portal/workflow/login.wf?sid=$sid&cmd=Portal_Execute_MessageWorkFlowTransaction&PORTLET_PARAM_SYSTEM_UUID=$uuid&PORTLET_PARAM_SYSTEM_UUID=$uuid'),
			'action_message':'portal/workflow/message.wf',
			'action_message_detail':'portal/workflow/message.wf?sid=$sid&cmd=WorkFlow_Execute_Worklist_BindReport_Open&id=$id&openstate=$openstate&task_id=$task_id',
			'action_govword':'portal/workflow/govWord.wf',
			
			'action_post':string.Template('post.php?action=newthread&fid=$fid&extra=page%3D1&topicsubmit=yes'),
			'action_seccode':string.Template('ajax.php?action=updateseccode&inajax=1'),
		}
		self.conf.update(param)
		#
		HttpClient.__init__(self, self.conf['url'], '')
		self.opener.addheaders=[('Accept-Language','zh-cn'), \
			('User-agent','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1))')]
		self.url = self.conf['url']
		self.encoding = self.conf['encoding']
		self.image_base = self.conf['image_base']
		self.formhash = ''
Ejemplo n.º 2
0
	def __init__(self):
		conf = self.conf
		HttpClient.__init__(self, conf['url'], conf['username'])