1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-22 07:56:49 +00:00

replaced owner for loop

This commit is contained in:
cryhwang 2022-12-11 22:02:22 -05:00
parent 2f76e1c0c5
commit a4ae6b4520

View File

@ -173,7 +173,6 @@ class GoogleDriveIE(InfoExtractor):
# API KEY: AIzaSyCGrlNJSIw19pjonNQOqMIyS2Xai9g0YT0
def _real_extract(self, url):
video_id = self._match_id(url)
print("_real_extract video_id: ", video_id)
video_info = compat_parse_qs(self._download_webpage(
'https://drive.google.com/get_video_info',
video_id, query={'docid': video_id}))
@ -182,9 +181,7 @@ class GoogleDriveIE(InfoExtractor):
createdTime = unified_strdate(json_data['createdTime'])
modifiedTime = unified_strdate(json_data['modifiedTime'])
owner_lst = []
for owner in json_data['owners']:
owner_lst.append(owner['displayName'])
owner_lst = [owner['displayName'] for owner in json_data['owners']]
def get_value(key):
return try_get(video_info, lambda x: x[key][0])