MCPcopy Create free account
hub / github.com/PostmonAPI/postmon / _request

Method _request

CepTracker.py:26–38  ·  view source on GitHub ↗
(self, cep)

Source from the content-addressed store, hash-verified

24 logging.config.dictConfig(config)
25
26 def _request(self, cep):
27 response = requests.post(self.url, data={
28 'cepEntrada': cep,
29 'tipoCep': '',
30 'cepTemp': '',
31 'metodo': 'buscarCep'
32 })
33 try:
34 response.raise_for_status()
35 except requests.exceptions.HTTPError as ex:
36 logging.error('Erro request site Correios', exc_info=True)
37 raise ex
38 return response.text
39
40 def _get_infos_(self, cep):
41 from lxml.html import fromstring

Callers 1

_get_infos_Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected