get - 无需 API 从 Vimeo 获取 img 缩略图
问题描述
试图从 vimeo 视频播放器 ID 中抓取缩略图,但没有得到任何响应或错误代码。我知道有 API,但这真的像 3 个月前一样有效,现在我的小应用程序坏了,我做错了什么?
Private Function RequestToVimeo(ByVal VimeoVideoID As String, ByVal views As Boolean, rndAgent As Boolean, referer As String, Proxy As WebProxy) As Boolean
ReDownloadJson:
Dim ResponseString As String = GetJson(VimeoVideoID, Proxy)
Try
Thistoken = Newtonsoft.Json.JsonConvert.DeserializeObject(Of VimeoJson)(ResponseString)
Catch ex1 As Exception
Try
Thistoken = Newtonsoft.Json.JsonConvert.DeserializeObject(Of OtherJson.VimeoJson)(ResponseString)
Catch ex As Exception
Proxy = Nothing
GoTo ReDownloadJson
End Try
End Try
If PreviewBox.ImageLocation Is Nothing OrElse PreviewBox.ImageLocation = String.Empty Then
PreviewBox.ImageLocation = Thistoken.video.thumbs.base + "_640.jpg"
End If
If response IsNot Nothing Then
response.Close()
End If
Return False
End Try
End Function
解决方案
好的,我修复了一些问题,这是正确的,我希望 :)
Private Sub getBtn_Click(sender As Object, e As EventArgs) Handles getBtn.Click
Try
Dim vimeoUrl As String = "https://i.vimeocdn.com/video/"
Dim vimeoID As String = videoID.Text 'this comes here your vimeo video ID
If PreviewBox.ImageLocation Is Nothing OrElse PreviewBox.ImageLocation = String.Empty Then
PreviewBox.ImageLocation = "https://i.vimeocdn.com/video/" + vimeoID + "_640.jpg"
End If
Catch ex As Exception
End Try
End Sub
推荐阅读
- ruby-on-rails - Rails 无头浏览器测试,无需安装浏览器
- c++ - 是否有任何与虚拟模板功能等效的模式?
- javascript - 使用 webpack 时找不到自定义 jQuery 扩展/插件
- visual-c++ - Visual C++ 2015-2019 Redistributable 何时导致 PC 重启
- python - dqn 状态值是否应该仅为 0 到 1
- oracle - PL/SQL 由 Oracle 数据库而不是主机系统执行
- c# - 定时器完成后重启功能
- robotframework - 如何在机器人框架上获取文本输入(autocomplete="new-password")?
- permissions - 为什么此角色在 QNA Maker 中无权执行此操作
- d3.js - 得到一些不属于我的数据的奇怪栏