Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Not so fast...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Not so fast...
Authored by: rmiller021 on May 24, '05 10:55:21PM
Here is some rough code to extract the url and download the real movie from the 264 byte file. It is rough, very little error checking and it could have problems i have not thought of. but it does work for the link in the parrent.
Just copy the url to the clip board and run this applescript, it should take care of the rest.

try
	tell application "Finder"
		try
			set MovieURL to the clipboard as text
		on error
			display dialog "Cannot get url from clipboard" buttons {"Cancel"}
		end try
	end tell
	
	
	try
		set AppleScript's text item delimiters to {"/"}
		set temp to ""
		
		--Get base url
		set x to ((count (every text item of MovieURL)) - 1)
		repeat until x = 1
			set temps_temp to item x of (every text item of MovieURL)
			set temp to temps_temp & "/" & temp
			set x to (x - 1)
		end repeat
		set baseurl to "http:/" & temp
		
		--//download and grep movie binary then extract the url for the actuall movie
		set downloaded_fake_url to (do shell script "curl -s " & MovieURL & " | grep -a url")
		set AppleScript's text item delimiters to {"*"}
		set movie_real_url to item 2 of (every text item of downloaded_fake_url)
		set AppleScript's text item delimiters to {".mov"}
		set movie_real_url to item 1 of (every text item of movie_real_url) & ".mov"
		
		--prompt user  
		set newFile to quoted form of POSIX path of (choose file name with prompt "Save movie as:" default name movie_real_url)
		--set up system call
		set theCommand to "curl -o " & newFile & " '" & baseurl & movie_real_url & "'"
		
		--execute in terminal
		tell application "Terminal"
			activate
			do script theCommand
		end tell
	on error
		display dialog "There seems to be a problem" buttons {"OK"}
	end try
end try

---
I have no clue what i am doing

[ Reply to This | # ]