Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -321,12 +321,16 @@ |
322 | 322 | counts.setdefault(contributor['username'], 0) |
323 | 323 | counts[contributor['username']] += 1 |
324 | 324 | |
| 325 | + clear_xml_elements(article) |
| 326 | + return counts |
| 327 | + |
| 328 | + |
| 329 | +def clear_xml_elements(article): |
325 | 330 | for elem in article: |
326 | | - elem.clear() |
| 331 | + if type(elem) != type('str'): |
| 332 | + elem.clear() |
327 | 333 | |
328 | | - return counts |
329 | 334 | |
330 | | - |
331 | 335 | def create_variables(article, cache, bots): |
332 | 336 | title = article['title'] |
333 | 337 | namespace = determine_namespace(title) |