mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 08:26:50 +00:00
[youtube] Support jwplayer with YouTube URLs (Closes #2075)
This commit is contained in:
parent
7f9886379c
commit
fc9713a1d2
@ -4,6 +4,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from .youtube import YoutubeIE
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
compat_urllib_error,
|
compat_urllib_error,
|
||||||
compat_urllib_parse,
|
compat_urllib_parse,
|
||||||
@ -339,6 +340,10 @@ class GenericIE(InfoExtractor):
|
|||||||
video_url = compat_urlparse.urljoin(url, video_url)
|
video_url = compat_urlparse.urljoin(url, video_url)
|
||||||
video_id = compat_urllib_parse.unquote(os.path.basename(video_url))
|
video_id = compat_urllib_parse.unquote(os.path.basename(video_url))
|
||||||
|
|
||||||
|
# Sometimes, jwplayer extraction will result in a YouTube URL
|
||||||
|
if YoutubeIE.suitable(video_url):
|
||||||
|
return self.url_result(video_url, 'Youtube')
|
||||||
|
|
||||||
# here's a fun little line of code for you:
|
# here's a fun little line of code for you:
|
||||||
video_id = os.path.splitext(video_id)[0]
|
video_id = os.path.splitext(video_id)[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user