implement ICapVideoProvider.get_video()
This commit is contained in:
parent
f02f0ec717
commit
6327e73b3a
3 changed files with 82 additions and 12 deletions
|
|
@ -44,11 +44,15 @@ class YoupornBackend(Backend, ICapVideoProvider):
|
|||
def need_url(func):
|
||||
def inner(self, *args, **kwargs):
|
||||
url = args[0]
|
||||
if u'youporn.com' not in url:
|
||||
if isinstance(url, (str,unicode)) and not url.isdigit() and u'youporn.com' not in url:
|
||||
return None
|
||||
return func(self, *args, **kwargs)
|
||||
return inner
|
||||
|
||||
@need_url
|
||||
def get_video(self, _id):
|
||||
return self.browser.get_video(_id)
|
||||
|
||||
@need_url
|
||||
def iter_page_urls(self, mozaic_url):
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue