def _get_data(self, node): output = { 'subtitle_text': unescape_html(strip_tags(node.toxml())) } output['start_time'], output['end_time'] = \ self._get_time(node.getAttribute('begin'), node.getAttribute('dur')) return output
def _get_data(self, node): output = {"subtitle_text": unescape_html(strip_tags(node.toxml()).strip())} output["start_time"] = self._get_time(node.getAttribute("timestamp")) output["end_time"] = self._get_time(node.getAttribute("end_timestamp")) return output
def _get_data(self, node): output = { 'subtitle_text': unescape_html(strip_tags(node.toxml()).strip()) } output['start_time'] = self._get_time(node.getAttribute('timestamp')) output['end_time'] = self._get_time(node.getAttribute('end_timestamp')) return output
def _get_data(self, node): output = { 'subtitle_text': unescape_html(strip_tags(node.toxml().replace("<br/>", "\n"))) } output['start_time'] = self._get_time(node.getAttribute('begin')) output['end_time'] = self._get_time(node.getAttribute('end')) return output
def _get_data(self, item, next_item=None): output = {} output['start_time'] = float(item.get('start')) if next_item is not None: output['end_time'] = float(next_item.get('start')) else: output['end_time'] = -1 output['subtitle_text'] = item.text and unescape_html(item.text) or u'' return output
def _get_data(self, item, next_item=None): output = {} output["start_time"] = float(item.get("start")) if next_item is not None: output["end_time"] = float(next_item.get("start")) else: output["end_time"] = -1 output["subtitle_text"] = item.text and unescape_html(item.text) or u"" return output
def _get_data(self, item): output = {} output['start_time'] = float(item.get('start')) output['end_time'] = output['start_time'] + float(item.get('dur')) output['subtitle_text'] = unescape_html(item.text) return output
def _get_data(self, node): output = {"subtitle_text": unescape_html(strip_tags(node.toxml()))} output["start_time"], output["end_time"] = self._get_time(node.getAttribute("begin"), node.getAttribute("dur")) return output