浏览代码

[cda] Improve birth validation detection (closes #14022) (#27929)

Co-authored-by: Sergey M <dstftw@gmail.com>
knapior 4 年之前
父节点
当前提交
7b8fa658f8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/cda.py

+ 1 - 1
youtube_dl/extractor/cda.py

@@ -96,7 +96,7 @@ class CDAIE(InfoExtractor):
             raise ExtractorError('This video is only available for premium users.', expected=True)
             raise ExtractorError('This video is only available for premium users.', expected=True)
 
 
         need_confirm_age = False
         need_confirm_age = False
-        if self._html_search_regex(r'(<form[^>]+action="/a/validatebirth")',
+        if self._html_search_regex(r'(<form[^>]+action="[^"]*/a/validatebirth[^"]*")',
                                    webpage, 'birthday validate form', default=None):
                                    webpage, 'birthday validate form', default=None):
             webpage = self._download_age_confirm_page(
             webpage = self._download_age_confirm_page(
                 url, video_id, note='Confirming age')
                 url, video_id, note='Confirming age')