瀏覽代碼

[nytimes] Correct _VALID_URL of NYTimesArticleIE

Yen Chi Hsuan 10 年之前
父節點
當前提交
5332fd91bf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/nytimes.py

+ 1 - 1
youtube_dl/extractor/nytimes.py

@@ -89,7 +89,7 @@ class NYTimesIE(NYTimesBaseIE):
 
 
 
 
 class NYTimesArticleIE(NYTimesBaseIE):
 class NYTimesArticleIE(NYTimesBaseIE):
-    _VALID_URL = r'https?://(?:www)?\.nytimes\.com/(.(?<!video))*?/(?:[^/]+/)*(?P<id>[^.]+)(?:\.html)?'
+    _VALID_URL = r'https?://(?:www\.)?nytimes\.com/(.(?<!video))*?/(?:[^/]+/)*(?P<id>[^.]+)(?:\.html)?'
     _TESTS = [{
     _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',
         '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',
         'md5': 'e2076d58b4da18e6a001d53fd56db3c9',