Get img thumbnails from Yahoo! Screen Video Player (not older webplayer)

人走茶凉 提交于 2019-12-06 07:18:15

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/13629547/get-img-thumbnails-from-yahoo-screen-video-player-not-older-webplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!