Reputation: 128
I am writing a small JavaScript to download videos from a site. The site doesn't contain the link to the file to played. It downloads a flash file from which the flash file requests a URL to the file on remote server.
So finally when embedded flash opens a URL, how can we intercept/capture the URL request?
Upvotes: 1
Views: 1474
Reputation: 1254
It's impossible to intercept any content from Browser Plugins through JavaScript, since you don't have full access of Web Browser API (the case of embedded JavaScript via script tags or bookmarklet).
If you make Firefox extension, you can act like Firebug or DownthemAll (Media-Sniffing mode, see https://github.com/nmaier/DownThemAll/blob/master/modules/support/contenthandling.jsm)
There only one alternative. Reverse engineering location of video, for example read flashvars, but some website like youtube are more complicated.
Upvotes: 1