catch errors when page is not found or if video is not yet available

This commit is contained in:
Romain Bignon 2011-07-01 14:08:03 +02:00
commit 95cb438294
2 changed files with 16 additions and 4 deletions

View file

@ -42,8 +42,11 @@ class PluzzBrowser(BaseBrowser):
self.location(url)
assert self.is_on_page(VideoPage)
metaurl = self.page.get_meta_url()
id = self.page.get_id()
metaurl = self.page.get_meta_url()
if metaurl is None:
return None
self.location(metaurl)
assert self.is_on_page(MetaVideoPage)