Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -642,6 +642,7 @@ |
643 | 643 | |
644 | 644 | article = {} |
645 | 645 | article['revisions'] = [] |
| 646 | + elements = [] |
646 | 647 | id = False |
647 | 648 | |
648 | 649 | try: |
— | — | @@ -664,8 +665,11 @@ |
665 | 666 | article['revisions'] = [] |
666 | 667 | article['namespaces'] = namespaces |
667 | 668 | id = False |
668 | | - #elif rts.kaggle == True and event == 'end': |
669 | | - # elem.clear() |
| 669 | + elements = [elem.clear() for elem in elements] |
| 670 | + elements = [] |
| 671 | + elif event == 'end': |
| 672 | + elements.append(elem) |
| 673 | + |
670 | 674 | except SyntaxError, error: |
671 | 675 | print 'Encountered invalid XML tag. Error message: %s' % error |
672 | 676 | dump(elem) |