use logger instead of print in modules

This commit is contained in:
Romain Bignon 2012-05-13 10:44:48 +02:00
commit ca7fd3c7f2
4 changed files with 5 additions and 8 deletions

View file

@ -33,10 +33,8 @@ class LoginPage(BasePage):
success_p = self.document.xpath( success_p = self.document.xpath(
'//p[text() = "Login Successful. You will be returned momentarily."]') '//p[text() = "Login Successful. You will be returned momentarily."]')
if len(success_p): if len(success_p):
print 'logged on'
return True return True
else: else:
print 'not logged on'
return False return False

View file

@ -32,7 +32,6 @@ class LoginPage(BasePage):
msg = msga.strip("\n") msg = msga.strip("\n")
if "maintenance" in msg: if "maintenance" in msg:
print "Fortuneo: "+msg
raise BrowserUnavailable(msg) raise BrowserUnavailable(msg)
self.browser.select_form(nr=3) self.browser.select_form(nr=3)

View file

@ -38,7 +38,7 @@ class IndexPage(BasePage):
url = title.attrib['href'] url = title.attrib['href']
m = re.match('^http://www.pluzz.fr/([^/]+)\.html$', url) m = re.match('^http://www.pluzz.fr/([^/]+)\.html$', url)
if not m: if not m:
print ':( %s' % url self.logger.debug('url %s does not match' % url)
continue continue
_id = m.group(1) _id = m.group(1)
video = PluzzVideo(_id) video = PluzzVideo(_id)

View file

@ -39,7 +39,7 @@ class IndexPage(BasePage):
url = a.attrib['href'] url = a.attrib['href']
m = re.match('/video-(.*)', url) m = re.match('/video-(.*)', url)
if not m: if not m:
print ':( %s' % url self.logger.debug('url %s does not match' % url)
continue continue
_id = m.group(1) _id = m.group(1)
video = TricTracTVVideo(_id) video = TricTracTVVideo(_id)