Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Glen
youtube-dl
Commits
16d3672a
Commit
16d3672a
authored
Jul 11, 2019
by
Remita Amine
Browse files
[espn] fix fivethirtyeight.com extraction
parent
0dd58a52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
youtube_dl/extractor/abcnews.py
youtube_dl/extractor/abcnews.py
+6
-3
youtube_dl/extractor/espn.py
youtube_dl/extractor/espn.py
+6
-10
No files found.
youtube_dl/extractor/abcnews.py
View file @
16d3672a
...
...
@@ -15,10 +15,13 @@ class AbcNewsVideoIE(AMPIE):
IE_NAME
=
'abcnews:video'
_VALID_URL
=
r
'''(?x)
https?://
abcnews\.go\.com/
(?:
[^/]+/video/(?P<display_id>[0-9a-z-]+)-|
video/embed\?.*?\bid=
abcnews\.go\.com/
(?:
[^/]+/video/(?P<display_id>[0-9a-z-]+)-|
video/embed\?.*?\bid=
)|
fivethirtyeight\.abcnews\.go\.com/video/embed/\d+/
)
(?P<id>\d+)
'''
...
...
youtube_dl/extractor/espn.py
View file @
16d3672a
...
...
@@ -216,17 +216,14 @@ class FiveThirtyEightIE(InfoExtractor):
_TEST
=
{
'url'
:
'http://fivethirtyeight.com/features/how-the-6-8-raiders-can-still-make-the-playoffs/'
,
'info_dict'
:
{
'id'
:
'
21846851
'
,
'ext'
:
'
mp4
'
,
'id'
:
'
56032156
'
,
'ext'
:
'
flv
'
,
'title'
:
'FiveThirtyEight: The Raiders can still make the playoffs'
,
'description'
:
'Neil Paine breaks down the simplest scenario that will put the Raiders into the playoffs at 8-8.'
,
'timestamp'
:
1513960621
,
'upload_date'
:
'20171222'
,
},
'params'
:
{
'skip_download'
:
True
,
},
'expected_warnings'
:
[
'Unable to download f4m manifest'
],
}
def
_real_extract
(
self
,
url
):
...
...
@@ -234,9 +231,8 @@ class FiveThirtyEightIE(InfoExtractor):
webpage
=
self
.
_download_webpage
(
url
,
video_id
)
video_id
=
self
.
_search_regex
(
r
'
data-video-id=["\'](?P<id>
\d+)'
,
webpage
,
'
video id'
,
group
=
'id
'
)
embed_url
=
self
.
_search_regex
(
r
'
<iframe[^>]+src=["\'](https?://fivethirtyeight\.abcnews\.go\.com/video/embed/\d+/
\d+)'
,
webpage
,
'
embed url
'
)
return
self
.
url_result
(
'http://espn.go.com/video/clip?id=%s'
%
video_id
,
ESPNIE
.
ie_key
())
return
self
.
url_result
(
embed_url
,
'AbcNewsVideo'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment