This commit is contained in:
Romain Bignon 2010-04-16 19:39:22 +02:00
commit d5c4304099
2 changed files with 3 additions and 2 deletions

View file

@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""
import ClientForm
from mechanize import FormNotFoundError
from weboob.tools.browser import BasePage
class PornPage(BasePage):
@ -27,5 +28,5 @@ class PornPage(BasePage):
self.browser.select_form(nr=0)
self.browser.submit(name='user_choice')
return False
except ClientForm.ControlNotFoundError, e:
except (ClientForm.ControlNotFoundError,FormNotFoundError):
return True

View file

@ -29,7 +29,7 @@ class VideoPage(PornPage):
URL_REGEXP = re.compile("https?://[w\.]*youporn.com/watch/(\d+)/?.*")
def on_loaded(self):
if not PornPage.loaded(self):
if not PornPage.on_loaded(self):
return
self.video = Video(self.get_id(),