[InfoExtractor] Add `_match_valid_url()` class method and refactor
authordirkf <fieldhouse@gmx.net>
Wed, 19 Jul 2023 13:14:50 +0000 (14:14 +0100)
committerdirkf <fieldhouse@gmx.net>
Wed, 19 Jul 2023 21:14:50 +0000 (22:14 +0100)
commitb2ba24bb026904f3503db71f65d2b1627f08edf1
treea81697902ace6dbdf90d0140f4a3067b4844e048
parenta190b559640ce1b5fe67e5a4843dc58328503f3c
[InfoExtractor] Add `_match_valid_url()` class method and refactor

* API compatible with yt-dlp
* also support Sequence of patterns in _VALID_URL
* one place to compile _VALID_URL
* TODO: remove existing extractor shims
devscripts/make_lazy_extractors.py
youtube_dl/extractor/common.py
youtube_dl/extractor/globalplayer.py