How to retrieve a YouTube caption track - coldfusion

Can someone show me how to retrieve a YouTube caption track?
I'm reading the documentation, and I don't know where to begin.
Should I use a cfhttp command or something else?

Yes, you would use cfhttp. You would first need to fetch information on the video itself. According to the docs, if a caption track exists, it's going to exist in the tag. So look for that, and if it exists, you do a second cfhttp call to fetch it. This could be something we add to the YoutubeCFC project as well.

You can grab it by copying from the web developers console.
I found it changing dynamically underneath #player .html5-video-player .html5-video-controls #caption-window-0
.caption-window-transform
.captions-text

Yes, You can use class httpclient from java. create object of it and use can fetch information from social site. get more details on it.

Related

Can I connect objects with javascript?

I want to make an interface that looks like this
So here is what the user can do
1- Connect people to each other
2- See some information about each person (the balloon)
3- Move these objects around without them loosing their connections
Then I want to save these connection information using ajax, so that I can see who is connected to who, I also need to redraw these diagrams next time the user sees the page.
It seems like jsPlumb, paperjs, and raphael can all do this and a lot more, my question is which one is suitable for this need.
inspect graphiti which is based on raphael.
http://www.draw2d.org/graphiti/jsdoc/#!/example
Greetings
Andreas

Django strategy for automatically suggesting matching content

I'm looking at porting a custom-written PHP CMS into Django. One of the features the CMS currently has is an image upload function. I write an article, tag it with information, then choose a photo for it. If the system has any photos which have been added to articles with tags in common with the new one, it will suggest the photo for that article too. If there are no matches then a new image can be added.
In case this doesn't make sense, let's say I tag an article as Bruce Springsteen, The Beatles and Led Zeppelin. Next time I add an article with the tag The Beatles, it should suggest I use the image added for the first article.
What would be the best Django-applicable way to implement this? I've looked at the Photologue app and have integrated it, and I know it has tagging support (the problem here is that I'm using django-taggit, whereas Photologue supports django-tagging). One approach could be simply building it myself -- when a user uploads an article, I run a hook after they save it to associate the tags with the image. I'm just not sure how to then autosuggest an image in the admin tools based on that info.
Any ideas/approaches greatly appreciated.
This is almost certainly something you're going to have to build yourself. Django has a moderate number of libraries out there (that you've clearly already found). Unlike other solutions, it doesn't have a lot of things that get you 100% to your desired solution (whereas something like Drupal might get you 100% of the way there).
What you will probably need to do (at a high level) is something like this:
Create an AJAX view that takes the current tags as an argument and does a query on the existing posts to see what tags match and returns images from those posts.
Use jQuery/javascript on your view to call your AJAX view on the page as tags are added
Use jQuery to update a <div> on your page and show all the images that your view returned
Here is a similar example that might help get you started.
You might look into django-ajax as a helper library for your requests, but it definitely isn't necessary.
The hook between the your image module and any other django module can be implemented using django's contenttypes framework which also provides some useful instance methods for returning related/hooked objects.

How to get external URLs likes

I'm trying to get the list of all the pages that a user "likes", both Facebook pages and external pages.
I know that the facebook pages (such as http://www.facebook.com/DealExtremeFans) I can obtain them with the "me/likes" value from the Graph.
But for a page such as (http://mashable.com/2012/01/20/advertisers-this-is-what-an-nfl-fan-looks-like-infographic/) that has a like button (under the title) I don't see how to get those likes.
Is this possible? If not, are you planning on adding support for this any time soon?
Thanks
EDIT:
According to the response below, even though they are added via the "like" button they are really "Shares".
Now my question is, how do I get those shares? what's the graph for them? I tried "me/shares" but doesn't exist.
Is there a way?
Yes it is possible, but it looks like that URL only has shares:
Click here.
And here is a link to a tutorial for getting the data via jQuery.

Getting all friends' pictures using the fields parameter doesn't seem to work?

I use the JavaScript SDK for Facebook Connect.
Yesterday I loaded all the friends of a logged in user like this:
https://graph.facebook.com/me/friends?fields=name,first_name,picture&access_token=MYACCESSTOKEN&callback=?
Using this code I got the id, name, first name and picture of all the friends that the logged in user has. This was called using AJAX/jsonp. As I said, it worked yesterday and no modifications have been done to the code since then.
Today I get the id, name and the first name - no picture(!) Could this be a glitch in Facebook Graph, has there been any updates that I could have missed or is the above call to the graph API invalid?
Is this a correct way to get the picture of all friends?
You're right, the picture field is not being returned anymore. However it is very easy to get the picture URL. http://graph.facebook.com/{friendId}/picture you can either call that to get it programmatically, or even have that graph call as the src attribute of the image tag <img src="http://graph.facebook.com/{friendId}/picture" />.
Update: Bug seems to be fixed now.
Once again, Facebook proves themselves. Why would anyone just remove something from an API without at least notifying people they are going to do it?
Fyi, I filed this bug report:
https://developers.facebook.com/bugs/269804093087242
My guess is that it gets ignored or closed as either a duplicate or wontfix and there won't be any recourse.
The issue with the workaround above is that img src url ends up being a http redirect instead of the absolute url like before. That just slows things down.

Caching data (image, rss) with django

That's my first question in here, I've been looking through old questions, but nothing matched with my problem. Here it is.
I'm creating some site with one main functionality. We want this site to display content of other sites, but in a specific way. User chooses let's say two pages from five and want to see their content. He clicks button 'Display' and goes to next page where he finds let's say view from web cam, and here comes problem.
I want to cache image that is hidden behind the url from which image was downloaded, so after refresh image won't be downloaded again, but browser will get it from cache.
I've been looking through documentation of Django, but nothing seemed to be useful.
I know that I should:
1) create table which stores cache
2) add to settings.py some CACHE_BACKEND = ...
3) use #cache_page(300) before declaration of function which returns content which should be cached,
but... it doesn't seem to work.
I will be greateful if someone tells how to solve that problem, maybe with some sort of code showing the mechanism.
Cheers,
Chris.
I think that right way to do this will be to store image somewhere on your server and delete it later with cron or something similar.
Django cache framework wasn't created for the purpose you are trying to use it.