-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
40 lines (29 loc) · 1.37 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# # -*- coding: utf-8 -*-
# # Sample Python code for youtube.commentThreads.list
# # See instructions for running these code samples locally:
# # https://developers.google.com/explorer-help/code-samples#python
# import os
# import googleapiclient.discovery
# import httplib2
# proxy_info = httplib2.ProxyInfo(proxy_type=httplib2.socks.PROXY_TYPE_HTTP,
# proxy_host="127.0.0.1",
# proxy_port=10809)
# http = httplib2.Http(timeout=10, proxy_info=proxy_info, disable_ssl_certificate_validation=False)
# def main():
# # Disable OAuthlib's HTTPS verification when running locally.
# # *DO NOT* leave this option enabled in production.
# os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
# api_service_name = "youtube"
# api_version = "v3"
# DEVELOPER_KEY = "AIzaSyAjF3ppo5L9JLIBfHTNM7vlvISFb5NLlss"
# youtube = googleapiclient.discovery.build(api_service_name,
# api_version,
# developerKey=DEVELOPER_KEY,
# http=http)
# request = youtube.commentThreads().list(part="id,snippet", maxResults=100, videoId="MuzMniAG2rQ")
# response = request.execute()
# print(response)
# if __name__ == "__main__":
# main()
print("test.py")
print("中文编码测试")