[okc] Photos handling in profile

This commit is contained in:
Roger Philibert 2012-03-21 21:37:12 +01:00 committed by Romain Bignon
commit cba809a8d0
3 changed files with 26 additions and 12 deletions

View file

@ -129,3 +129,8 @@ class ProfilePage(BasePage):
profile['data']['details'].value[key] = ProfileNode(key, label, val)
return profile
class PhotosPage(BasePage):
def get_photos(self):
imgs = self.parser.select(self.document.getroot(), "//div[@class='pic clearfix']//img", method='xpath')
return [img.get('src') for img in imgs]