diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-19 07:11:24 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-23 00:50:40 +0530 |
commit | 5ad28e7ffd41deccba33776c1609aa7855601739 (patch) | |
tree | 19c70ba4188e9f12815fa086cbdf9025107c2e64 /yt_dlp/extractor/rcti.py | |
parent | f79ec47d71c3d28e19bc68c1d61ae149e74fae2f (diff) |
[extractor] Common function `_match_valid_url`
Diffstat (limited to 'yt_dlp/extractor/rcti.py')
-rw-r--r-- | yt_dlp/extractor/rcti.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/yt_dlp/extractor/rcti.py b/yt_dlp/extractor/rcti.py index 278bfd7d7..31d9779dd 100644 --- a/yt_dlp/extractor/rcti.py +++ b/yt_dlp/extractor/rcti.py @@ -4,7 +4,6 @@ from __future__ import unicode_literals import itertools import json import random -import re import time from .common import InfoExtractor @@ -148,7 +147,7 @@ class RCTIPlusIE(RCTIPlusBaseIE): } def _real_extract(self, url): - match = re.match(self._VALID_URL, url).groupdict() + match = self._match_valid_url(url).groupdict() video_type, video_id, display_id = match['type'], match['id'], match['display_id'] url_api_version = 'v2' if video_type == 'missed-event' else 'v1' @@ -280,7 +279,7 @@ class RCTIPlusSeriesIE(RCTIPlusBaseIE): yield url_res def _real_extract(self, url): - series_id, display_id = re.match(self._VALID_URL, url).groups() + series_id, display_id = self._match_valid_url(url).groups() series_meta, meta_paths = self._call_api( 'https://api.rctiplus.com/api/v1/program/%s/detail' % series_id, display_id, 'Downloading series metadata') @@ -347,7 +346,7 @@ class RCTIPlusTVIE(RCTIPlusBaseIE): return False if RCTIPlusIE.suitable(url) else super(RCTIPlusTVIE, cls).suitable(url) def _real_extract(self, url): - match = re.match(self._VALID_URL, url).groupdict() + match = self._match_valid_url(url).groupdict() tv_id = match.get('tvname') or match.get('eventname') webpage = self._download_webpage(url, tv_id) video_type, video_id = self._search_regex( |