def _parse_mks_response_for_mks_id(response):
     # Part of the response may be encoded as HTML entities. We need to
     # decode such entities so as to retrieve the text of <value>
     decoded = BeautifulSoup(response,
                             convertEntities=BeautifulSoup.XML_ENTITIES)
     soup = BeautifulSoup(decoded.encode("UTF-8"))
     return int(soup.find("value").string)
Exemplo n.º 2
0
 def _parse_mks_response_for_mks_id(response):
     # Part of the response may be encoded as HTML entities. We need to
     # decode such entities so as to retrieve the text of <value>
     decoded = BeautifulSoup(response, convertEntities=BeautifulSoup.XML_ENTITIES)
     soup = BeautifulSoup(decoded.encode("UTF-8"))
     return int(soup.find("value").string)