Wenn ich versuche mit diesem Script
from googleapiclient.discovery import build
api_key = 'Dein API Key'
youtube = build('youtube', 'v3', developerKey=api_key)
def get_subscriptions():
subscriptions = []
next_page_token = None
while True:
request = youtube.subscriptions().list(
part='snippet',
mine=True,
maxResults=50,
pageToken=next_page_token
)
response = request.execute()
subscriptions.extend(response['items'])
next_page_token = response.get('nextPageToken')
if not next_page_token:
break
return subscriptions
if __name__ == '__main__':
subscriptions = get_subscriptions()
for subscription in subscriptions:
print(subscription['snippet']['title'])
meine Youtube Abonements anzuzeigen bekomme ich den Fehler
ModuleNotFoundError: No module named 'googleapiclient'
Wenn ich versuche das Paket mit PIP zu installieren sagt PIP das das Modul nicht gefunden wurde.
ERROR: Could not find a version that satisfies the requirement googleapiclient (from versions: none)
ERROR: No matching distribution found for googleapiclient
[notice] A new release of pip is available: 23.2 -> 23.2.1
[notice] To update, run: python.exe -m pip install --upgrade pip
Wie installiere ich die Google Client API in Python?