This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
youtube-dl
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1.1k
Wiki
Activity
Browse Source
[generic,vodplatform] improve embed regex
totalwebcasting
Remita Amine
8 years ago
parent
9ba1e1dcc0
commit
93b8404599
2 changed files
with
3 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
youtube_dl/extractor/generic.py
+1
-1
youtube_dl/extractor/vodplatform.py
+ 2
- 2
youtube_dl/extractor/generic.py
View File
@ -2243,11 +2243,11 @@ class GenericIE(InfoExtractor):
# Look for VODPlatform embeds
mobj
=
re
.
search
(
r
'
<iframe[^>]+src=[
\'
"
](
(?:https?:)?//(?:www
\
.)?vod-platform
\
.net/
embed/[^/?#]+)
'
,
r
'
<iframe[^>]+src=
(
[
"
\'
])(?P<url>
(?:https?:)?//(?:www
\
.)?vod-platform
\
.net/
[eE]mbed/.+?)
\
1
'
,
webpage
)
if
mobj
is
not
None
:
return
self
.
url_result
(
self
.
_proto_relative_url
(
unescapeHTML
(
mobj
.
group
(
1
)
)
)
,
'
VODPlatform
'
)
self
.
_proto_relative_url
(
unescapeHTML
(
mobj
.
group
(
'
url
'
)
)
)
,
'
VODPlatform
'
)
# Look for Instagram embeds
instagram_embed_url
=
InstagramIE
.
_extract_embed_url
(
webpage
)
+ 1
- 1
youtube_dl/extractor/vodplatform.py
View File
@ -6,7 +6,7 @@ from ..utils import unescapeHTML
class
VODPlatformIE
(
InfoExtractor
)
:
_VALID_URL
=
r
'
https?://(?:www
\
.)?vod-platform
\
.net/embed/(?P<id>[^/?#]+)
'
_VALID_URL
=
r
'
https?://(?:www
\
.)?vod-platform
\
.net/
[
e
E]
mbed/(?P<id>[^/?#]+)
'
_TEST
=
{
# from http://www.lbcgroup.tv/watch/chapter/29143/52844/%D8%A7%D9%84%D9%86%D8%B5%D8%B1%D8%A9-%D9%81%D9%8A-%D8%B6%D9%8A%D8%A7%D9%81%D8%A9-%D8%A7%D9%84%D9%80-cnn/ar
'
url
'
:
'
http://vod-platform.net/embed/RufMcytHDolTH1MuKHY9Fw
'
,
Write
Preview
Loading…
Cancel
Save