Skip to content

Commit ee015f1

Browse files
author
wanjiewu
committed
add:mediainfo_snapshot
1 parent 1aa0c59 commit ee015f1

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
*.pyc
1+
*.pyc
2+
ignore/
3+
.vscode/

demo/ci_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# COS支持的所有region列表参见https://www.qcloud.com/document/product/436/6224
2424
token = None # 如果使用永久密钥不需要填入token,如果使用临时密钥需要填入,临时密钥生成和使用指引参见https://cloud.tencent.com/document/product/436/14048
2525

26-
config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key, Token=token, Scheme='https', EndpointCi='') # 获取配置对象
26+
config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key, Token=token, Scheme='https') # 获取配置对象
2727
client = CosS3Client(config)
2828

2929

qcloud_cos/cos_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(self, Appid=None, Region=None, SecretId=None, SecretKey=None, Token
9494
if (Scheme != u'http' and Scheme != u'https'):
9595
raise CosClientError('Scheme can be only set to http/https')
9696
self._scheme = Scheme
97-
97+
9898
# 格式化ci的endpoint 不支持自定义域名的
9999
self._endpoint_ci = format_endpoint(EndpointCi, Region, u'ci.')
100100

@@ -5146,7 +5146,7 @@ def get_snapshot(self, Bucket, Key, Time, Width=None, Height=None, Format='jpg',
51465146
:param Height(string): 截图高.
51475147
:param Format(string): jpg, png.
51485148
:param Rotate(string): auto 自动根据媒体信息旋转, off 不旋转.
5149-
:param Mode(dict): 设置下载的headers.
5149+
:param Mode(string): 截帧方式 keyframe:截取指定时间点之前的最近的一个关键帧 exactframe:截取指定时间点的帧.
51505150
:return(dict): 下载成功返回的结果,包含Body对应的StreamBody,可以获取文件流或下载文件到本地.
51515151
51525152
.. code-block:: python

ut/test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
Region=REGION,
3636
SecretId=SECRET_ID,
3737
SecretKey=SECRET_KEY,
38-
EndpointCi='',
3938
)
4039
client = CosS3Client(conf, retry=3)
4140
rsa_provider = RSAProvider()

0 commit comments

Comments
 (0)