mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-28 03:42:51 +08:00
[UDNEmbed]modify regex in udn.py
This commit is contained in:
parent
b0ae68de85
commit
79f4be30a3
@ -706,7 +706,7 @@ from .udemy import (
|
||||
UdemyIE,
|
||||
UdemyCourseIE
|
||||
)
|
||||
from .udn import UDNIE
|
||||
from .udn import UDNEmbedIE
|
||||
from .ultimedia import UltimediaIE
|
||||
from .unistra import UnistraIE
|
||||
from .urort import UrortIE
|
||||
|
@ -42,7 +42,7 @@ from .sportbox import SportBoxEmbedIE
|
||||
from .smotri import SmotriIE
|
||||
from .myvi import MyviIE
|
||||
from .condenast import CondeNastIE
|
||||
from .udn import UDNIE
|
||||
from .udn import UDNEmbedIE
|
||||
from .senateisvp import SenateISVPIE
|
||||
from .bliptv import BlipTVIE
|
||||
from .svt import SVTIE
|
||||
|
@ -10,9 +10,9 @@ from ..utils import (
|
||||
from ..compat import compat_urlparse
|
||||
|
||||
|
||||
class UDNIE(InfoExtractor):
|
||||
class UDNEmbedIE(InfoExtractor):
|
||||
IE_DESC = '聯合影音'
|
||||
_VALID_URL = r'https?://video\.udn\.com/((?:embed|play)/)?news/(?P<id>\d+)'
|
||||
_VALID_URL = r'(?:https?:)?//video\.udn\.com/(?:embed|play)/news/(?P<id>\d+)'
|
||||
_TESTS = [{
|
||||
'url': 'http://video.udn.com/embed/news/300040',
|
||||
'md5': 'de06b4c90b042c128395a88f0384817e',
|
||||
@ -32,10 +32,6 @@ class UDNIE(InfoExtractor):
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
if "embed" not in url and "play" not in url:
|
||||
p = url.index("com/") + 4
|
||||
url = url[:p] + "embed/" + url[p:]
|
||||
|
||||
video_id = self._match_id(url)
|
||||
|
||||
page = self._download_webpage(url, video_id)
|
||||
|
Loading…
Reference in New Issue
Block a user