Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
    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
Beispiel #4
0
    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
Beispiel #5
0
    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
Beispiel #6
0
    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
Beispiel #7
0
    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
Beispiel #8
0
    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
Beispiel #9
0
 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
Beispiel #10
0
 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
Beispiel #11
0
 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