mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-24 20:38:22 +00:00
Tweak regexes
This commit is contained in:
parent
232cb00919
commit
4f2c652189
|
@ -33,7 +33,8 @@ from ..utils import (
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
callable(format_field)
|
if not callable(format_field):
|
||||||
|
raise NameError
|
||||||
except NameError:
|
except NameError:
|
||||||
from ..utils import IDENTITY, NO_DEFAULT, variadic
|
from ..utils import IDENTITY, NO_DEFAULT, variadic
|
||||||
|
|
||||||
|
@ -324,7 +325,7 @@ class FranceTVIE(InfoExtractor):
|
||||||
|
|
||||||
class FranceTVEmbedIE(FranceTVBaseIE):
|
class FranceTVEmbedIE(FranceTVBaseIE):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://embed\.francetv\.fr(?:/*\?.*?\b(?P<ue>ue)=|/)
|
https?://embed\.francetv\.fr(?:/?\?(?:.*&)?(?P<ue>ue)=|/)
|
||||||
(?P<id>[\da-f]{32})(?:(?(ue)&|/?[?#]).*)?$
|
(?P<id>[\da-f]{32})(?:(?(ue)&|/?[?#]).*)?$
|
||||||
'''
|
'''
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
|
@ -372,7 +373,7 @@ class FranceTVEmbedIE(FranceTVBaseIE):
|
||||||
|
|
||||||
class FranceTVSiteIE(FranceTVBaseIE):
|
class FranceTVSiteIE(FranceTVBaseIE):
|
||||||
IE_NAME = 'francetv:site'
|
IE_NAME = 'francetv:site'
|
||||||
_VALID_URL = r'https?://(?:(?:www\.)?france\.tv|mobile\.france\.tv)/(?:[^/]+/)*(?P<id>[^/]+)\.html'
|
_VALID_URL = r'https?://(?:(?:www|mobile)\.)?france\.tv)/(?:[^/]+/)*(?P<id>[^/]+)\.html'
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html',
|
'url': 'https://www.france.tv/france-2/13h15-le-dimanche/140921-les-mysteres-de-jesus.html',
|
||||||
|
|
Loading…
Reference in a new issue