# -*- coding: utf-8 -*- # flake8: noqa import qiniu from qiniu import CdnManager # 账户ak,sk access_key = ‘...‘ secret_key = ‘...‘ auth = qiniu.Auth(access_key=access_key, secret_key=secret_key) cdn_manager = CdnManager(auth) # 需要刷新的文件链接 urls = [ ‘http://aaa.example.com/a.gif‘, ‘http://bbb.example.com/b.jpg‘ ] # URL刷新链接 refresh_url_result = cdn_manager.refresh_urls(urls) # 目录刷新链接 refresh_dir_result = cdn_manager.refresh_dirs(dirs) print(refresh_url_result) print(refresh_dir_result)
原文地址:https://www.cnblogs.com/xshan/p/12273280.html
时间: 2024-10-18 06:03:09