]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/voicy.py
[cleanup] Misc cleanup
[yt-dlp.git] / yt_dlp / extractor / voicy.py
index ae29c3de2dd368abcb4516dea92f64f8b3199c61..37c7d5685fe155eb15dc42c645f3cc7f6cb3538f 100644 (file)
@@ -6,12 +6,12 @@
 from ..utils import (
     ExtractorError,
     smuggle_url,
+    str_or_none,
     traverse_obj,
-    unsmuggle_url,
     unified_strdate,
+    unsmuggle_url,
 )
 
-import re
 import itertools
 
 
@@ -26,9 +26,9 @@ def _extract_from_playlist_data(self, value):
             'id': voice_id,
             'title': compat_str(value.get('PlaylistName')),
             'uploader': value.get('SpeakerName'),
-            'uploader_id': compat_str(value.get('SpeakerId')),
+            'uploader_id': str_or_none(value.get('SpeakerId')),
             'channel': value.get('ChannelName'),
-            'channel_id': compat_str(value.get('ChannelId')),
+            'channel_id': str_or_none(value.get('ChannelId')),
             'upload_date': upload_date,
         }
 
@@ -81,7 +81,7 @@ class VoicyIE(VoicyBaseIE):
     }]
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
+        mobj = self._match_valid_url(url)
         assert mobj
         voice_id = mobj.group('id')
         channel_id = mobj.group('channel_id')