import googleapiclient.discovery
def main():
«»»Search on YouTube for videos about ‘programming’.»»»
# Set up the API client
youtube = googleapiclient.discovery.build(
«youtube»,
«v3″,
developerKey=api_key,
cache_discovery=False,
)
# Make the search request
response = youtube.search().list(
q=»installation de plomberie»,
part=»snippet»,
maxResults=5,
).execute()
# Print the results
for item in response[«items»]:
print(item[«snippet»][«title»])
if __name__ == «__main__»:
main()