[cda] Improve birth validation detection (closes #14022) (#27929)
authorknapior <knapior93@gmail.com>
Wed, 27 Jan 2021 19:43:20 +0000 (20:43 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Jan 2021 19:43:20 +0000 (02:43 +0700)
Co-authored-by: Sergey M <dstftw@gmail.com>
youtube_dl/extractor/cda.py

index d67900e62632294100244475241bd91583f27281..6429454fb22389ca137f12415f26afd3f343bb56 100644 (file)
@@ -96,7 +96,7 @@ class CDAIE(InfoExtractor):
             raise ExtractorError('This video is only available for premium users.', expected=True)
 
         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 = self._download_age_confirm_page(
                 url, video_id, note='Confirming age')