1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 11:26:40 -04:00

[extractor] Common function _match_valid_url

This commit is contained in:
pukkandan
2021-08-19 07:11:24 +05:30
parent f79ec47d71
commit 5ad28e7ffd
293 changed files with 389 additions and 541 deletions

View File

@@ -3,7 +3,6 @@ from __future__ import unicode_literals
import json
import hashlib
import re
from .aws import AWSIE
from .anvato import AnvatoIE
@@ -55,7 +54,7 @@ class ScrippsNetworksWatchIE(AWSIE):
_AWS_USER_AGENT = 'aws-sdk-js/2.80.0 callback'
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
mobj = self._match_valid_url(url)
site_id, video_id = mobj.group('site', 'id')
aws_identity_id_json = json.dumps({
@@ -146,7 +145,7 @@ class ScrippsNetworksIE(InfoExtractor):
_TP_TEMPL = 'https://link.theplatform.com/s/ip77QC/media/guid/%d/%s?mbr=true'
def _real_extract(self, url):
site, guid = re.match(self._VALID_URL, url).groups()
site, guid = self._match_valid_url(url).groups()
return self.url_result(smuggle_url(
self._TP_TEMPL % (self._ACCOUNT_MAP[site], guid),
{'force_smil_url': True}), 'ThePlatform', guid)