]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/funk.py
[ie/nfb] Add support for onf.ca and series (#8997)
[yt-dlp.git] / yt_dlp / extractor / funk.py
index 81d1949fd22fac93e78460e47bd79a6a50ff0105..539d719c5bec228c78696686a351b5b458a8c587 100644 (file)
@@ -1,8 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
-import re
-
 from .common import InfoExtractor
 from .nexx import NexxIE
 from ..utils import (
@@ -12,7 +7,7 @@
 
 
 class FunkIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:www\.|origin\.)?funk\.net/(?:channel|playlist)/[^/]+/(?P<display_id>[0-9a-z-]+)-(?P<id>\d+)'
     _TESTS = [{
         'url': 'https://www.funk.net/channel/ba-793/die-lustigsten-instrumente-aus-dem-internet-teil-2-1155821',
         'md5': '8dd9d9ab59b4aa4173b3197f2ea48e81',
@@ -31,7 +26,7 @@ class FunkIE(InfoExtractor):
     }]
 
     def _real_extract(self, url):
-        display_id, nexx_id = re.match(self._VALID_URL, url).groups()
+        display_id, nexx_id = self._match_valid_url(url).groups()
         video = self._download_json(
             'https://www.funk.net/api/v4.0/videos/' + nexx_id, nexx_id)
         return {