i’v been searching around for this for a while. i want users to be able to grab the link to a flash file from the current page in the default browser then download it. how would i go about doing this?
Do you know about the “Activity” window in Safari? If not, it basically lists all of the activity on a page. If there’s a link to be gotten from a web page it would be in there. You’d have to figure out how to parse the text from the window and get the link… then the rest should be easy.
Another way is to use the unix executable called “tcpflow” in the Terminal application. I’ve used it before to see links that didn’t show in the activity window. It’s really complicated though, so tread lightly with that one.
I’m not an expert on these things so I can’t really help you other than to give you some ideas.
Another way would be to parse through the page source, extract the links, and download with curl
do you have an example of how to search for .swf files on a page?
option-klick doesn’t work?
option click? you mean control click? you can control click a flash game on a website to download it.
No, I mean option-klick to download a file directly from a link
well thats the thing, i dont have the link, i need to get the link to the flash file on a given site.
I didn’t think you could click download a swf file in the first place. As for an example Ill work one up tomorrow and post some code.
Well the question is… have you looked through the 3 sources we gave you to see if you can find the link in any of them? The 3 sources were 1) page source code 2) activity window, and 3) the results from running tcpflow? If you can find the link in one fo those sources then the rest is cake. You can always find the link with tcpflow, but options 1 and 2 would be easier. So have you looked? Have ou found it?