move id2url to tools

This commit is contained in:
Christophe Benz 2010-04-27 12:19:48 +02:00 committed by Romain Bignon
commit 0667774952
12 changed files with 119 additions and 18 deletions

View file

@ -23,6 +23,10 @@ from weboob.capabilities.video import ICapVideoProvider
from .browser import YoujizzBrowser
__all__ = ['YoujizzBackend']
class YoujizzBackend(BaseBackend, ICapVideoProvider):
NAME = 'youjizz'
MAINTAINER = 'Roger Philibert'
@ -41,6 +45,10 @@ class YoujizzBackend(BaseBackend, ICapVideoProvider):
return self._browser
raise AttributeError, name
@classmethod
def id2url(cls, _id):
return 'http://www.youjizz.com/videos/%s.html' % _id
def check_url(func):
def inner(self, *args, **kwargs):
url = args[0]