From c239b89602ab09bba6d1c630fd4e3087dbda9892 Mon Sep 17 00:00:00 2001
From: unknown <Administrator@.(none)>
Date: Tue, 28 Sep 2010 22:26:36 +0200
Subject: [PATCH 2/3] name & headshot fix

---
 imdb/parser/http/personParser.py |   24 +++++++++++-------------
 1 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/imdb/parser/http/personParser.py b/imdb/parser/http/personParser.py
index d35f378..e30de5d 100644
--- a/imdb/parser/http/personParser.py
+++ b/imdb/parser/http/personParser.py
@@ -99,13 +99,11 @@ class DOMHTMLMaindetailsParser(DOMParserBase):
                               status=x.get('status') or None))]
 
     extractors = [
-            Extractor(label='page title',
-                        path="//title",
+            Extractor(label='name',
+                        path="//h1[@class='header']",
                         attrs=Attribute(key='name',
-                            path="./text()",
-                            postprocess=lambda x: analyze_name(x,
-                                                            canonical=1))),
-
+                            path="./text()")),
+							
             Extractor(label='birth info',
                         path="//div[h5='Date of Birth:']",
                         attrs=_birth_attrs),
@@ -114,11 +112,6 @@ class DOMHTMLMaindetailsParser(DOMParserBase):
                         path="//div[h5='Date of Death:']",
                         attrs=_death_attrs),
 
-            Extractor(label='headshot',
-                        path="//a[@name='headshot']",
-                        attrs=Attribute(key='headshot',
-                            path="./img/@src")),
-
             Extractor(label='akas',
                         path="//div[h5='Alternate Names:']",
                         attrs=Attribute(key='akas',
@@ -181,7 +174,11 @@ class DOMHTMLBioParser(DOMParserBase):
                         # TODO: check if this slicing is always correct
                         postprocess=lambda x: u''.join(x).strip()[2:])]
     extractors = [
-            Extractor(label='birth info',
+            Extractor(label='headshot',
+                        path="//a[@name='headshot']",
+                        attrs=Attribute(key='headshot',
+                            path="./img/@src")),
+			Extractor(label='birth info',
                         path="//div[h5='Date of Birth']",
                         attrs=_birth_attrs),
             Extractor(label='death info',
@@ -200,7 +197,8 @@ class DOMHTMLBioParser(DOMParserBase):
                         attrs=Attribute(key='birth name',
                             path="./text()",
                             postprocess=lambda x: canonicalName(x.strip()))),
-            Extractor(label='height',
+            
+			Extractor(label='height',
                         path="//div[h5='Height']",
                         attrs=Attribute(key='height',
                             path="./text()",
-- 
1.7.0.2.msysgit.0

