X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fnytimes.py;h=7f254b867da66f70a79ff7aac5d81eb6f37bd997;hb=55801fc76e2813de9a84eaa830d70ed73cb44463;hp=266d8d4006377fc68e48c4329c0b985694367852;hpb=50aa43b3ae074781bb7c7ad55a85f54b1fd84146;p=youtube-dl diff --git a/youtube_dl/extractor/nytimes.py b/youtube_dl/extractor/nytimes.py index 266d8d400..7f254b867 100644 --- a/youtube_dl/extractor/nytimes.py +++ b/youtube_dl/extractor/nytimes.py @@ -89,8 +89,8 @@ class NYTimesIE(NYTimesBaseIE): class NYTimesArticleIE(NYTimesBaseIE): - _VALID_URL = r'https?://(?:www)?\.nytimes\.com/\d{4}/\d{2}/\d{2}/(?:[^/]+/)*(?P[^.]+)\.html' - _TEST = { + _VALID_URL = r'https?://(?:www\.)?nytimes\.com/(.(?[^.]+)(?:\.html)?' + _TESTS = [{ 'url': 'http://www.nytimes.com/2015/04/14/business/owner-of-gravity-payments-a-credit-card-processor-is-setting-a-new-minimum-wage-70000-a-year.html?_r=0', 'md5': 'e2076d58b4da18e6a001d53fd56db3c9', 'info_dict': { @@ -102,7 +102,10 @@ class NYTimesArticleIE(NYTimesBaseIE): 'upload_date': '20150414', 'uploader': 'Matthew Williams', } - } + }, { + 'url': 'http://www.nytimes.com/news/minute/2014/03/17/times-minute-whats-next-in-crimea/?_php=true&_type=blogs&_php=true&_type=blogs&_r=1', + 'only_matching': True, + }] def _real_extract(self, url): video_id = self._match_id(url)