A feature-rich command-line audio/video downloader
[ie] `_rta_search`: Do not assume `age_limit` is `0` (#13985)
doe10806ae3543d5a1f
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.pyindex e003f6be74..a96fb9c4cb 100644--- a/yt_dlp/extractor/common.py+++ b/yt_dlp/extractor/common.py@@ -1527,11 +1527,11 @@ class InfoExtractor:r'>\s*(?:18\s+U(?:\.S\.C\.|SC)\s+)?(?:§+\s*)?2257\b',]- age_limit = 0+ age_limit = Nonefor marker in AGE_LIMIT_MARKERS:mobj = re.search(marker, html)if mobj:- age_limit = max(age_limit, int(traverse_obj(mobj, 1, default=18)))+ age_limit = max(age_limit or 0, int(traverse_obj(mobj, 1, default=18)))return age_limitdef _media_rating_search(self, html):diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.pyindex bc34aafa7a..b3a27f31e8 100644--- a/yt_dlp/extractor/generic.py+++ b/yt_dlp/extractor/generic.py@@ -121,7 +121,6 @@ class GenericIE(InfoExtractor):'id': 'cauky-lidi-70-dil-babis-predstavil-pohadky-prymulanek-nebo-andrejovy-nove-saty-ac867','ext': 'mp4','title': 'čauky lidi 70 finall',- 'age_limit': 0,'description': 'md5:47b2673a5b76780d9d329783e1fbf5aa','direct': True,'duration': 318.0,@@ -244,7 +243,6 @@ class GenericIE(InfoExtractor):'id': 'paris-d-moll','ext': 'mp4','title': 'Paris d-moll',- 'age_limit': 0,'description': 'md5:319e37ea5542293db37e1e13072fe330','thumbnail': r're:https?://www\.filmarkivet\.se/wp-content/uploads/.+\.jpg',},@@ -255,7 +253,6 @@ class GenericIE(InfoExtractor):'info_dict': {'id': '60413035','title': 'Etter ett års planlegging, klaffet endelig alt: - Jeg måtte ta en liten dans',- 'age_limit': 0,'description': 'md5:bbb4e12e42e78609a74fd421b93b1239','thumbnail': r're:https?://www\.dagbladet\.no/images/.+',},@@ -267,7 +264,6 @@ class GenericIE(InfoExtractor):'info_dict': {'id': 'single_clip','title': 'Single Clip player examples',- 'age_limit': 0,},'playlist_count': 3,}, {@@ -324,7 +320,6 @@ class GenericIE(InfoExtractor):'id': 'videos-1','ext': 'mp4','title': 'Videos & Audio - King Machine (1)',- 'age_limit': 0,'description': 'Browse King Machine videos & audio for sweet media. Your eyes will thank you.','thumbnail': r're:https?://media\.indiedb\.com/cache/images/.+\.jpg','_old_archive_ids': ['generic videos'],@@ -363,7 +358,6 @@ class GenericIE(InfoExtractor):'id': '21217','ext': 'mp4','title': '40 ночей (2016) - BogMedia.org',- 'age_limit': 0,'description': 'md5:4e6d7d622636eb7948275432eb256dc3','display_id': '40-nochey-2016','thumbnail': r're:https?://bogmedia\.org/contents/videos_screenshots/.+\.jpg',@@ -378,7 +372,6 @@ class GenericIE(InfoExtractor):'id': '18485','ext': 'mp4','title': 'Клип: Ленинград - ЗОЖ скачать, смотреть онлайн | Youix.com',- 'age_limit': 0,'display_id': 'leningrad-zoj','thumbnail': r're:https?://youix\.com/contents/videos_screenshots/.+\.jpg',},@@ -419,7 +412,6 @@ class GenericIE(InfoExtractor):'id': '105','ext': 'mp4','title': 'Kelis - 4th Of July / Embed Player',- 'age_limit': 0,'display_id': 'kelis-4th-of-july','thumbnail': r're:https?://www\.kvs-demo\.com/contents/videos_screenshots/.+\.jpg',},@@ -430,9 +422,8 @@ class GenericIE(InfoExtractor):'info_dict': {'id': 'beltzlaw-1','ext': 'mp4',- 'title': 'Beltz Law Group | Dallas Traffic Ticket, Accident & Criminal Attorney (1)',- 'age_limit': 0,- 'description': 'md5:5bdf23fcb76801dc3b31e74cabf82147',+ 'title': str,+ 'description': str,'thumbnail': r're:https?://beltzlaw\.com/wp-content/uploads/.+\.jpg','timestamp': int, # varies'upload_date': str,@@ -447,7 +438,6 @@ class GenericIE(InfoExtractor):'id': 'cine-1','ext': 'webm','title': 'CINE.AR (1)',- 'age_limit': 0,'description': 'md5:a4e58f9e2291c940e485f34251898c4a','thumbnail': r're:https?://cine\.ar/img/.+\.png','_old_archive_ids': ['generic cine'],@@ -461,7 +451,6 @@ class GenericIE(InfoExtractor):'id': 'ipy2AcGL','ext': 'mp4','title': 'Hoe een bladvlo dit verwoestende Japanse onkruid moet vernietigen',- 'age_limit': 0,'description': 'md5:6a9d644bab0dc2dc06849c2505d8383d','duration': 111.0,'thumbnail': r're:https?://images\.nu\.nl/.+\.jpg',@@ -477,7 +466,6 @@ class GenericIE(InfoExtractor):'id': 'porsche-911-gt3-rs-rij-impressie-2','ext': 'mp4','title': 'Test: Porsche 911 GT3 RS - AutoWeek',- 'age_limit': 0,'description': 'md5:a17b5bd84288448d8f11b838505718fc','direct': True,'thumbnail': r're:https?://images\.autoweek\.nl/.+',@@ -493,7 +481,6 @@ class GenericIE(InfoExtractor):'id': 'k6gl2kt2eq','ext': 'mp4','title': 'Breezy HR\'s ATS helps you find & hire employees sooner',- 'age_limit': 0,'average_rating': 4.5,'description': 'md5:eee75fdd3044c538003f3be327ba01e1','duration': 60.1,@@ -509,7 +496,6 @@ class GenericIE(InfoExtractor):'id': 'videojs_hls_test','ext': 'mp4','title': 'video',- 'age_limit': 0,'duration': 1800,},'params': {'skip_download': 'm3u8'},