【问题标题】:Error trying to replace Vimeo file using Python library尝试使用 Python 库替换 Vimeo 文件时出错
【发布时间】:2022-12-22 03:27:20
【问题描述】:

我正在使用 Vimeo Python 库 example。设置一个简单示例后,出现以下错误。我需要创建一个新令牌吗?

错误

window.vimeo.exception_data = {"title":"Unauthorized","message":"Oops! This action could not be completed because your form session expired. Please make sure your cookies are enabled, then return to the previous page and try again.","notification":null,"search":true,"videos":null,"ad_config":{"house_ads_enabled":false},"page_type":"exception","module_type":"standard_multi"};

代码

import vimeo
import os


VIMEO_TOKEN=os.environ.get("TOKEN")
VIMEO_KEY=os.environ.get("KEY")
VIMEO_SECRET=os.environ.get("SECRET")


client = vimeo.VimeoClient(
    token=VIMEO_TOKEN,
    key=VIMEO_KEY,
    secret=VIMEO_SECRET
)



video_uri = client.replace(
                'https://vimeo.com/745944239',
                'test_replace_test.mov'
            )

【问题讨论】:

    标签: python vimeo-api


    【解决方案1】:

    您需要使用视频的 API URI,效果如下

    client.replace('/videos/745944239', 'file_to_replace.mov')

    【讨论】:

      猜你喜欢
      • 2017-05-14
      • 2020-03-19
      • 1970-01-01
      • 1970-01-01
      • 2016-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多