support https?://www\.canal-?plus\.fr/.*\?vid=(\d+) urls
This commit is contained in:
parent
b10f21334b
commit
605d673dd4
1 changed files with 5 additions and 0 deletions
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
from weboob.capabilities.video import ICapVideo
|
from weboob.capabilities.video import ICapVideo
|
||||||
from weboob.tools.backend import BaseBackend, BackendConfig
|
from weboob.tools.backend import BaseBackend, BackendConfig
|
||||||
from weboob.tools.value import Value
|
from weboob.tools.value import Value
|
||||||
|
|
@ -51,6 +53,9 @@ class CanalplusBackend(BaseBackend, ICapVideo, ICapCollection):
|
||||||
return self.browser.iter_search_results(pattern)
|
return self.browser.iter_search_results(pattern)
|
||||||
|
|
||||||
def get_video(self, _id):
|
def get_video(self, _id):
|
||||||
|
m = re.match('https?://www\.canal-?plus\.fr/.*\?vid=(\d+)', _id)
|
||||||
|
if m:
|
||||||
|
_id = m.group(1)
|
||||||
with self.browser:
|
with self.browser:
|
||||||
return self.browser.get_video(_id)
|
return self.browser.get_video(_id)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue