mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-01-05 09:16:18 +00:00
passed flake8
This commit is contained in:
parent
11242ed9ab
commit
9583355a42
@ -16,6 +16,7 @@ from ..utils import (
|
|||||||
unified_strdate,
|
unified_strdate,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class GoogleDriveIE(InfoExtractor):
|
class GoogleDriveIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
@ -163,14 +164,12 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
return self._get_captions_by_type(
|
return self._get_captions_by_type(
|
||||||
video_id, subtitles_id, 'automatic_captions', origin_lang_code)
|
video_id, subtitles_id, 'automatic_captions', origin_lang_code)
|
||||||
|
|
||||||
|
|
||||||
def _call_api(self, video_id):
|
def _call_api(self, video_id):
|
||||||
# Call Google Drive API
|
# Call Google Drive API
|
||||||
json_data = self._download_json('https://www.googleapis.com/drive/v3/files/%s?fields=createdTime,modifiedTime,owners&key=%s' % (video_id, self._API_KEY), video_id)
|
json_data = self._download_json('https://www.googleapis.com/drive/v3/files/%s?fields=createdTime,modifiedTime,owners&key=%s' % (video_id, self._API_KEY), video_id)
|
||||||
print("_real_extract json_data: ", json_data)
|
print("_real_extract json_data: ", json_data)
|
||||||
return json_data
|
return json_data
|
||||||
|
|
||||||
|
|
||||||
# USING URL: https://drive.google.com/file/d/1lVFQrzYKnJDd045Gc9xv1W4YA9zKPX7r/view?usp=sharing
|
# USING URL: https://drive.google.com/file/d/1lVFQrzYKnJDd045Gc9xv1W4YA9zKPX7r/view?usp=sharing
|
||||||
# API KEY: AIzaSyCGrlNJSIw19pjonNQOqMIyS2Xai9g0YT0
|
# API KEY: AIzaSyCGrlNJSIw19pjonNQOqMIyS2Xai9g0YT0
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
@ -188,7 +187,6 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
for owner in json_data['owners']:
|
for owner in json_data['owners']:
|
||||||
owner_lst.append(owner['displayName'])
|
owner_lst.append(owner['displayName'])
|
||||||
|
|
||||||
|
|
||||||
def get_value(key):
|
def get_value(key):
|
||||||
return try_get(video_info, lambda x: x[key][0])
|
return try_get(video_info, lambda x: x[key][0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user