]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/playvid.py
[compat] Remove more functions
[yt-dlp.git] / yt_dlp / extractor / playvid.py
index 4aef186ea22b4dab1be50a0bdd6dbcbbcae1e2b1..18aeda7de38376346933096dabbddbfc38ec97e8 100644 (file)
@@ -1,16 +1,9 @@
-from __future__ import unicode_literals
-
 import re
+import urllib.parse
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_urllib_parse_unquote,
-    compat_urllib_parse_unquote_plus,
-)
-from ..utils import (
-    clean_html,
-    ExtractorError,
-)
+from ..compat import compat_urllib_parse_unquote
+from ..utils import ExtractorError, clean_html
 
 
 class PlayvidIE(InfoExtractor):
@@ -64,7 +57,7 @@ def _real_extract(self, url):
                 val = videovars_match.group(2)
 
                 if key == 'title':
-                    video_title = compat_urllib_parse_unquote_plus(val)
+                    video_title = urllib.parse.unquote_plus(val)
                 if key == 'duration':
                     try:
                         duration = int(val)
@@ -85,8 +78,7 @@ def _real_extract(self, url):
 
         # Extract title - should be in the flashvars; if not, look elsewhere
         if video_title is None:
-            video_title = self._html_search_regex(
-                r'<title>(.*?)</title', webpage, 'title')
+            video_title = self._html_extract_title(webpage)
 
         return {
             'id': video_id,