mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-18 07:05:41 +07:00
[extractor] Common function _match_valid_url
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..compat import compat_HTTPError
|
||||
@@ -287,7 +286,7 @@ def _get_disco_api_info(self, url, display_id, disco_host, realm, country):
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
mobj = self._match_valid_url(url)
|
||||
display_id = mobj.group('id')
|
||||
domain = mobj.group('domain').lstrip('www.')
|
||||
country = mobj.group('country') or mobj.group('subdomain_country') or mobj.group('plus_country')
|
||||
|
||||
Reference in New Issue
Block a user