Simplify the code

This commit is contained in:
Florent 2014-04-01 12:59:13 +02:00
commit 1994970385
3 changed files with 10 additions and 18 deletions

View file

@ -108,11 +108,9 @@ class LoginPage(HTMLPage):
return False
realpasswd = ""
span = self.doc.find('//span[@id="digitpaddisplayLogin"]')
i = 0
for font in span.getiterator('font'):
for i, font in enumerate(span.getiterator('font')):
if font.attrib.get('class') == "vide":
realpasswd += password[i]
i += 1
self.browser.logger.debug('We are looking for : ' + realpasswd)
self.browser.logger.debug("Coordonates: " + vk.get_string_code(realpasswd))