1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 11:41:52 +00:00

[extractor/common] Improve is_suitable

In order to fix breakage introduced by a3aa814b77
This commit is contained in:
Sergey M․ 2016-07-26 23:54:06 +07:00
parent 3e050d51d4
commit 40090e8d51
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -1786,7 +1786,7 @@ class InfoExtractor(object):
any_restricted = False any_restricted = False
for tc in self.get_testcases(include_onlymatching=False): for tc in self.get_testcases(include_onlymatching=False):
if 'playlist' in tc: if tc.get('playlist', []):
tc = tc['playlist'][0] tc = tc['playlist'][0]
is_restricted = age_restricted( is_restricted = age_restricted(
tc.get('info_dict', {}).get('age_limit'), age_limit) tc.get('info_dict', {}).get('age_limit'), age_limit)