]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/pinterest.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / pinterest.py
index 09aeea3400aa94b4272f5ca6327bd1b93d195ab2..2c6cd6d4bbb295e49d5490f237273ff76a2079f9 100644 (file)
@@ -1,8 +1,4 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import json
-import re
 
 from .common import InfoExtractor
 from ..compat import compat_str
@@ -56,7 +52,6 @@ def _extract_video(self, data, extract_formats=True):
                         'height': int_or_none(format_dict.get('height')),
                         'duration': duration,
                     })
-            self._sort_formats(formats)
 
         description = data.get('description') or data.get('description_html') or data.get('seo_description')
         timestamp = unified_timestamp(data.get('created_at'))
@@ -165,7 +160,7 @@ def suitable(cls, url):
             PinterestCollectionIE, cls).suitable(url)
 
     def _real_extract(self, url):
-        username, slug = re.match(self._VALID_URL, url).groups()
+        username, slug = self._match_valid_url(url).groups()
         board = self._call_api(
             'Board', slug, {
                 'slug': slug,