从雅虎获取 img 缩略图!屏幕视频播放器(不是较旧的网络播放器) [英] Get img thumbnails from Yahoo! Screen Video Player (not older webplayer)

查看:29
本文介绍了从雅虎获取 img 缩略图!屏幕视频播放器(不是较旧的网络播放器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取雅虎!屏幕视频的图像缩略图嵌入到我的网站上,就像我们可以在其他网站中轻松做到的一样(从Vimeo?我该怎么做从 YouTube API 获取 YouTube 视频缩略图? 等).

曾经有一个建议:获取雅虎视频的缩略图?(python) 但它现在似乎不适用于新的 Yahoo!屏幕.

在互联网上的一些快速搜索使我找到了 Y! 自己的在线帮助:http://help.yahoo.com/l/in/yahoo/video/using/using005.html;_ylt=Aj3rNfbhKBNyXODHGK5ONSo1qXtG

据此,我所要做的就是复制共享"选项卡下的缩略图代码.不幸的是,我似乎在分享标签下找不到任何缩略图代码.

我在 http://developer.yahoo.com 上也找不到任何 Y!Screen api/everything.html 可以帮助我解决这个问题...想法?

解决方案

使用 YQL 对于跨域数据抓取以及 jQuery 是有效的解决方案.

有些是合理的,有些是骇人听闻的,但我想这就是抓取的全部内容.

这个方法的基础不是我做的,而是使用了 Facebook 的一个名为创建 Facebook 风格使用 jQuery & 进行链接预览YQL 由 Jocelyn Stretton 编写.

包含在作为起点的修改后的 JavaScript 中,您将可以访问并了解如何检索以下内容:

1. 雅虎!屏幕视频网页标题
2. 雅虎!屏幕缩略图 URL 链接
3. 雅虎!屏幕视频网址链接
4.抓取其他meta标签内容
5. 雅虎屏幕播放器本身提供的雅虎屏幕视频嵌入代码.

jsFiddle 中的演示!

jsFiddle DEMO 不再依赖于视频示例的子域(区域).

编辑 2:对于那些希望看到基于此 .ajax() YQL 过程的另一个教程的人,我为 Pinterest 数据抓取制作了两个 jsFiddle.您可以看到 SO Answer 此处,其中详细讨论了 XPATH.>

I am trying to get yahoo! screen video's image thumbs to embed on my website like we can easily do in other websites ( Get img thumbnails from Vimeo?, How do I get a YouTube video thumbnail from the YouTube API?, etc.).

There used to be a sugestion: Get thumbnail image for Yahoo video? (python) but it doesn't seem to work now with the new Yahoo! Screen.

Some quick searching on the Internets led me to Y!'s very own online help: http://help.yahoo.com/l/in/yahoo/video/using/using005.html;_ylt=Aj3rNfbhKBNyXODHGK5ONSo1qXtG

According to which, all I have to do is Copy the thumbnail code under the Share tab. Unfortunately, I can't seem to find any thumbnail code under the Share tab.

I also couldn't find any Y!Screen api on http://developer.yahoo.com/everything.html that could help me with this... ideas?

解决方案

Using YQL for cross domain data scraping along with jQuery is the solution that works.

Some of it is sound, some of it is hackish, but that's what scraping is all about I suppose.

The basis for this method was not done by me, but by using a tutorial for Facebook titled Create a Facebook-style Link Preview Using jQuery & YQL written by Jocelyn Stretton.

Included in the modified JavaScript which serves as a starting point, you will have access and understand how to retrieve the following:

1. Yahoo! Screen Video Webpage Title
2. Yahoo! Screen Thumbnail URL Link
3. Yahoo! Screen Video URL Link
4. Scrape Other meta Tag Content
5. Yahoo Screen Video Embed Code provided by the Yahoo Screen Player itself.

DEMO in jsFiddle!

EDIT: jsFiddle DEMO is no longer subdomain (regionally) dependent for video example.

EDIT 2: For those that would like to see another tutorial based on this .ajax() YQL process, I've made two jsFiddles for Pinterest Data Scraping. You can see that SO Answer here that discusses a lot more in detail for XPATH.

这篇关于从雅虎获取 img 缩略图!屏幕视频播放器(不是较旧的网络播放器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆