Homepage:
http://www.teewars.com/
Read more...
The Apple website contains a significant amount of movie trailers. This site includes all the trailers of films which are reasonably well-known. It also provides, for most of them, trailers in HD (High-Definition) format which have a small protection to prevent the download of its content. Hence, I’ve created a script which downloads the trailers in High-Definition.
This kind of protection is basic: there’s a link-file which the user can open through QuickTime, for example, and that file has the name of the real video file. In fact, that video file has a small difference, it has a character add-on.
Thus, after a thorough analysis, I found out the small differences in each file and I’ve created this script. I’m going to publish two versions in this article: in the first one you can choose the HD quality: 480p or 720p or 1020p; while in the second one you can download in 720p quality. Most PCs have a resolution of approximately 720p (opportunity to say that if you want it with another quality you may ask).
So, the functioning of the script is simple: you run it and then it will ask you for the link of the film (you can put the direct link of the film, or the link to the page in HD of the film). After that, it will ask you the quality (the 720p version doesn’t have this option for the script), and it will immediately begin the download. In the end, if the file already existed it will indicate error. If you have successfully managed to copy the trailer, a message indicating success will be displayed. Note that all trailers which are available for that particular film are copied, in the chosen quality.
Aspects to be developed
Since the version is still in development, some small basic options are missing. Note:
1. It only tells you that the trailer already exists at the end of the download;
2. It doesn’t have a native progress bar, therefore, to see the progress, the script has to be opened in the terminal;
3. It only downloads HD trailers, so it doesn’t have the option of downloading trailers with lower quality;
4. It doesn’t include the option of choosing a specific trailer, it downloads all the trailers which are available for that particular film and resolution;
5. It could also be more compact, but since there isn't much processing, I didn’t care about the programming quality, but the practical results.
How to install it?
Its installation is simple: download the script file, open the terminal and go to the folder where you saved the file. Then, in order to make the script executable, type the following:
For the full version:
Or to 720p version:
After that, the script is ready to be used, just do the following on the terminal to run it:
For the full version:
Or to 720p version:
File download
Now that I’ve explained its functionalities and problems, I’m going to indicate the links for the download of the two versions and then I will show you the content of each script.
Full version.
720p version.
Code
Full version.
#!/bin/bash
####################################################
#Visit my blog: http://ubuntued.info/ #
####################################################
name=$( zenity --entry --text="URL:" --title="Apple Trailers")
temp=$(echo $name grep "/hd/")
if [[ $temp = "" ]]
then name=$(echo $name"hd/")
fi
quality=$(zenity --text="Which quality do you wish?" --list --radiolist --column sel --column sel2 1 480 2 720 3 1080)
if [[ $name != "" ]]
then
wget $name -File.html
case $quality
in
480)
action=$(cat file.html grep 480 awk -F"','" '{ print $10 }' awk -F"480" '{ print "wget " $1 "h480" $2 }')
;;
720)
action=$(cat file.html grep 720 awk -F"','" '{ print $10 }' awk -F"720" '{ print "wget " $1 "h720" $2 }')
;;
1080)
action=$(cat file.html grep 1080 awk -F"','" '{ print $10 }' awk -F"1080" '{ print "wget " $1 "h1080" $2 }')
;;
esac
rm file.html
action=$(echo $action awk -F"/" '{ print $NF }')
existent=$(ls grep "$action")
if [[ $existent = $action ]]
then zenity --question --text="You already have this trailer: \n \t (File's name: $existent ).\n Do you wish to continue?" exit
fi
$action sh
existent=$(ls grep "$action")
if [[ $existent = $action ]]
then zenity --info --text="Well-succeeded, the file was saved as $existent"
else zenity --error --text="Fail ocurred. Possible problems: The file already existed or the download couldn't be done."
fi
fi
Versão 720p.
#!/bin/bash
####################################################
#Visit my blog: http://ubuntued.info/ #
####################################################
name=$( zenity --entry --text="URL:" --title="Apple Trailers")
temp=$(echo $name grep "/hd/")
if [[ $temp = "" ]]
then name=$(echo $name"hd/")
fi
if [[ $name != "" ]]
then
wget $name -File.html
action=$(cat file.html grep 720 awk -F"','" '{ print $10 }' awk -F"720" '{ print "wget " $1 "h720" $2 }')
rm file.html
action=$(echo $action awk -F"/" '{ print $NF }')
existent=$(ls grep "$action")
if [[ $existent = $action ]]
then zenity --question --text="You already have this trailer: \n \t (File's name: $existent ).\n Do you wish to continue?" exit
fi
$action sh
existent=$(ls grep "$action")
if [[ $existent = $action ]]
then zenity --info --text="Well-succeeded, the file was saved as $existe"
else zenity --error --text="Fail ocurred. Possible problems: The file already existed or the download couldn't be done."
fi
fi
Finally, I would like to inform that whenever I update this script, only this web page will be updated, so if you want to be constantly updated leave a comment and activate the option "Notify me of follow up comments via e-mail." So when I update, I will write an informative comment about the new update and you’ll be notified (:
UPDATES
[2008 Jul 08]
As I have mentioned, I will update this script so that it becomes more effective, more embracing and with fewer errors. Thus, this new update informs you if the trailer you want to copy exists before downloading it.
The special effects (Compiz) of ubuntu windows use the GTK by default. To adjust the transparency of the windows just go to the configuration editor of GNOME and change the values in the way you want.
1. Press ALT+F2 to open "Run Application";
2. Write gconf-editor and run;
3. Go to apps->gwd and you’ll find the following lines:
metacity_theme_active_opacity -> Value of transparency of the windows on which we are working;
metacity_theme_opacity -> Value of transparency of the windows which are behind.
Value "1" indicates "without any transparency"; value "0" indicates "maximum transparency" (other than invisibility).
Ubuntu offers a huge variety of repository servers. There are servers in many countries and many of these countries have more than one server. But, which one is the fastest?
There is an option which tests which server is the fastest to respond to our connection.
Procedure:
Sometimes we need to use ISO files, but we don’t want to record a CD/DVD for that purpose. But mounting an iso file, without scripts, would be a little complicated for beginners, so it is best to install two scripts, one to mount and the other one to unmount.
You simply have to download the files mount and unmount and install them in the nautilus. If you don’t know how to install scripts, visit this link.
This information was taken from this site:
http://ubuntuforums.org/showthread.php?t=87369
Preload is a program which analyses the applications the user uses the most to subsequently predict what applications will be run. Therefore, it stores the dependencies of those programs in the computer’s memory, in order to be faster to boot up.
Install preload
For further information:
http://sourceforge.net/projects/preload
I strongly advise you to use this program!
Versão portuguesa
Version française