- if self.parsing:
- data = data.strip()
- if self.attr is not None and data:
- self.cur[self.attr] = data
- self.attr = None
- elif data in ('Downloads:', 'Cds:', 'Comentarios:',
- 'Formato:'):
- self.attr = data[:-1].lower()
- elif data == 'Subido por:':
- self.attr = 'autor'
- elif data == 'el':
- self.attr = 'fecha'
+ if not self.parsing:
+ return
+ data = data.strip()
+ # Hack to handle comments in <script> <style> which don't end
+ # up in handle_comment(), so we just ignore the whole tags
+ if self.in_script_style:
+ return
+ if self.attr is not None and data:
+ self.cur[self.attr] = data
+ self.attr = None
+ elif data in ('Downloads:', 'Cds:', 'Comentarios:',
+ 'Formato:'):
+ self.attr = data[:-1].lower()
+ elif data == 'Subido por:':
+ self.attr = 'autor'
+ elif data == 'el':
+ self.attr = 'fecha'