aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-02-02 23:38:54 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-02-02 23:38:54 +0100
commita465808592bd9e017e83478863b12b96c686f920 (patch)
treed6084d1e85c8bbdf8e1d8b10844260ab79cae9e1 /youtube_dl
parent5c4862bad4ba38f4ddd86d4fb1305aa5b82b2bd6 (diff)
parenta57b562cff57a5cbd06cb22b37962861a423e428 (diff)
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/nfl.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/youtube_dl/extractor/nfl.py b/youtube_dl/extractor/nfl.py
index 606e2294e..2684dd250 100644
--- a/youtube_dl/extractor/nfl.py
+++ b/youtube_dl/extractor/nfl.py
@@ -46,7 +46,18 @@ class NFLIE(InfoExtractor):
'timestamp': 1388354455,
'thumbnail': 're:^https?://.*\.jpg$',
}
- }
+ },
+ {
+ 'url': 'http://www.nfl.com/news/story/0ap3000000467586/article/patriots-seahawks-involved-in-lategame-skirmish',
+ 'info_dict': {
+ 'id': '0ap3000000467607',
+ 'ext': 'mp4',
+ 'title': 'Frustrations flare on the field',
+ 'description': 'Emotions ran high at the end of the Super Bowl on both sides of the ball after a dramatic finish.',
+ 'timestamp': 1422850320,
+ 'upload_date': '20150202',
+ },
+ },
]
@staticmethod
@@ -80,7 +91,11 @@ class NFLIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
config_url = NFLIE.prepend_host(host, self._search_regex(
- r'(?:config|configURL)\s*:\s*"([^"]+)"', webpage, 'config URL'))
+ r'(?:config|configURL)\s*:\s*"([^"]+)"', webpage, 'config URL',
+ default='static/content/static/config/video/config.json'))
+ # For articles, the id in the url is not the video id
+ video_id = self._search_regex(
+ r'contentId\s*:\s*"([^"]+)"', webpage, 'video id', default=video_id)
config = self._download_json(config_url, video_id,
note='Downloading player config')
url_template = NFLIE.prepend_host(