better code and check youtube.com is in url
This commit is contained in:
parent
9fb8d540ba
commit
07b54f47a0
2 changed files with 15 additions and 9 deletions
|
|
@ -38,6 +38,9 @@ class YoutubeBackend(Backend, ICapVideoProvider):
|
|||
def inner(self, *args, **kwargs):
|
||||
if not self.browser:
|
||||
self.browser = YoutubeBrowser()
|
||||
url = args[0]
|
||||
if u'youtube.com' not in url:
|
||||
return None
|
||||
return func(self, *args, **kwargs)
|
||||
return inner
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue