Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -257,8 +257,8 @@ |
258 | 258 | 'User Talk': 3, |
259 | 259 | } |
260 | 260 | ns = {} |
261 | | - if title.text != None: |
262 | | - title = title.text |
| 261 | + if title != None: |
| 262 | + #title = title.text |
263 | 263 | for namespace in namespaces: |
264 | 264 | if title.startswith(namespace): |
265 | 265 | ns['namespace'] = namespaces[namespace] |
— | — | @@ -324,8 +324,8 @@ |
325 | 325 | |
326 | 326 | |
327 | 327 | def create_variables(article, cache, bots): |
328 | | - title = article['title'].text |
329 | | - namespace = determine_namespace(article['title']) |
| 328 | + title = article['title'] |
| 329 | + namespace = determine_namespace(title) |
330 | 330 | |
331 | 331 | if namespace != False: |
332 | 332 | cache.stats.count_articles += 1 |
— | — | @@ -379,7 +379,7 @@ |
380 | 380 | |
381 | 381 | article = {} |
382 | 382 | id = False |
383 | | - article[root.tag] = root |
| 383 | + article[root.tag] = root.text |
384 | 384 | article['revisions'] = [] |
385 | 385 | for event, elem in context: |
386 | 386 | if event == 'end' and elem.tag == 'revision': |
— | — | @@ -388,6 +388,7 @@ |
389 | 389 | article[elem.tag] = elem |
390 | 390 | id = True |
391 | 391 | |
| 392 | + root.clear() |
392 | 393 | return article |
393 | 394 | |
394 | 395 | |