]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/oftv.py
[ie/mlbtv] Fix extraction (#10296)
[yt-dlp.git] / yt_dlp / extractor / oftv.py
index 3ae7278fb917bfeff1063b4e496efbb1f4893586..415694ceebc114ba75f5c6aae69d62642d0f41e3 100644 (file)
@@ -4,7 +4,7 @@
 
 
 class OfTVIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?of.tv/video/(?P<id>\w+)'
+    _VALID_URL = r'https?://(?:www\.)?of\.tv/video/(?P<id>\w+)'
     _TESTS = [{
         'url': 'https://of.tv/video/627d7d95b353db0001dadd1a',
         'md5': 'cb9cd5db3bb9ee0d32bfd7e373d6ef0a',
@@ -20,8 +20,8 @@ class OfTVIE(InfoExtractor):
             'timestamp': 1652391300,
             'upload_date': '20220512',
             'view_count': 0,
-            'creator': 'This is Fire'
-        }
+            'creator': 'This is Fire',
+        },
     }]
 
     def _real_extract(self, url):
@@ -34,13 +34,13 @@ def _real_extract(self, url):
 
 
 class OfTVPlaylistIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?of.tv/creators/(?P<id>[a-zA-Z0-9-]+)/.?'
+    _VALID_URL = r'https?://(?:www\.)?of\.tv/creators/(?P<id>[a-zA-Z0-9-]+)/?(?:$|[?#])'
     _TESTS = [{
         'url': 'https://of.tv/creators/this-is-fire/',
         'playlist_count': 8,
         'info_dict': {
-            'id': 'this-is-fire'
-        }
+            'id': 'this-is-fire',
+        },
     }]
 
     def _real_extract(self, url):