예제 #1
0
 def parse_json(self, data):
     self._distance = data['distance']['value']
     self._distance_text = data['distance']['text']
     self._duration = data['duration']['value']
     self._duration_text = data['duration']['text']
     self._instructions = TextUtils.strip_html(data['html_instructions'])
예제 #2
0
파일: google.py 프로젝트: Freiza/program-y
 def parse_json(self, data):
     self._distance = data['distance']['value']
     self._distance_text = data['distance']['text']
     self._duration = data['duration']['value']
     self._duration_text = data['duration']['text']
     self._instructions = TextUtils.strip_html(data['html_instructions'])
예제 #3
0
 def test_strip_html(self):
     self.assertEquals("", TextUtils.strip_html(""))
     self.assertEquals("", TextUtils.strip_html("<html></html>"))
     self.assertEquals("Hello World", TextUtils.strip_html("<html>Hello <b>World</b></html>"))