[Sync] ALS Typograf stability impovements
This commit is contained in:
1 parent
7793830e60
commit
fc43f89099
1 file changed
+4
-2
@@ -27,10 +27,12 @@ async def typograf(text, options={}):
|
||||
'Content-Type': 'text/xml',
|
||||
'SOAPAction': 'http://typograf.artlebedev.ru/webservices/ProcessText',
|
||||
})
|
||||
|
||||
response_tree = etree.fromstring(resp.encode())
|
||||
resp_text = resp.encode()
|
||||
|
||||
try:
|
||||
# create xml tree from response
|
||||
response_tree = etree.fromstring(resp_text)
|
||||
|
||||
# look for ProcessTextResult
|
||||
typograf_response = response_tree.getchildren()[0].getchildren()[0].getchildren()[0].text
|
||||
except Exception as response_tree:
|
||||
|
||||
Reference in new issue
Block a user