Sovren恢复分析器Python

2024-03-29 06:05:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用Sovren Resume Parser API,我对API非常陌生。我的应用程序使用Django-Python,因此,我希望使用Python脚本实现调用并接收这个API。在

文档-http://resumeparsing.com/

我需要一个关于如何做这件事的概述。在


Tags: django文档脚本comapi应用程序httpparser
2条回答

我在Python中使用了以下代码来解析作业顺序和恢复。在

有一件事我搞不懂,那就是压缩/压缩请求数据。的输出压缩()或压缩()不起作用。web服务抱怨数据转换失败。在

from zeep import Client
import os

#If required, set proxy.
#os.environ["http_proxy"] = 'http://user:password@host:port'
#os.environ["https_proxy"] = 'https://user:password@host:port'

account_id = 'account_id'
service_key = 'service_key'

client = Client('http://services.resumeparsing.com/ParsingService.asmx?wsdl')

with open('C:/temp/jd.docx', 'rb') as in_file:
    file_bytes = in_file.read()

request = {'AccountId':account_id, 'ServiceKey':service_key, 'FileBytes':file_bytes}

response = client.service.ParseJobOrder(request)
# Similarlly ParseResume() for parsing resume.

print('response.Code = ', response.Code)
print('response.SubCode = ', response.SubCode)
print('response.Message = ', response.Message)
print('response.Xml = ', response.Xml)
from zeep import Client

client = Client('http://services.resumeparsing.com/ResumeService.asmx?wsdl')

response = client.service.GetAccountInfo(request={'AccountId': 'AccountId','ServiceKey':'ServiceKey'})
print(response)

使用Zeep模块做到了!这也适用于Python3!在

相关问题 更多 >