[컴][GAE] urlfetch, how to get the UTF-8 page

google app engine / retreive the UTF-8 page


google app engine
how to use urlfetch to get the UTF-8 page

google app engine 에서 UTF-8 page 를 가져올 때


        result = urlfetch.fetch(url,
                    method=urlfetch.GET,
                    headers=header,
                    deadline=60
                )
        
        
        logger.debug(result.status_code)

       
        if result.status_code == 200:
            dataRetrieved = result.content.decode('utf-8')    # utf-8

References

  1. https://code.google.com/p/googleappengine/issues/detail?id=376

댓글 없음:

댓글 쓰기