Fabulous glamour shot Found this picture on the web today. Being a lazy programmer, I don't want to actually open google and type a couple of characters. Way too much work! This is such an important task that it should be automated.
Challenge
Everyone knows that the first image in a google search result is always the best. Hence it should be presented to the user.
You are to write a program or function which takes a string as parameter and displays the first image it finds on google when you search for that name + the words glamour shot behind it.
Google search queries
To search for images on google, the url should contain the query parameter tbm=isch and q=query, with query being the name you want to search for.
A valid query string for my name Bas would be www.google.com/search?tbm=isch&amp;q=Bas
Input
Your program or function takes a single parameter of input, which is the name you want to search for on google. This string will consist of the characters [a-z], [A-Z], [0-9] and   (space). This string can be space seperated, to search for a space seperated string on google, one should replace the spaces with +. For example, this is a valid query:
www.google.com/search?tbm=isch&amp;q=Bassdrop+Cumberwubwubwub+glamour+shot
Output
The image can either be drawn to the screen, or saved to a file (in any format).
If the first search result on google is a gif file, you can either show the gif or show any frame of that gif.
Test cases
Run this snippet to see the expected results


&lt;pre&gt;f('Bas') // www.google.com/search?tbm=isch&amp;q=Bas+glamour+shot

&lt;img src="http://i.stack.imgur.com/IViaM.jpg" style="width:40%;height:40%"/&gt;

&lt;pre&gt;f('Bassdrop Cumberwubwubwub') // www.google.com/search?tbm=isch&amp;q=Bassdrop+Cumberwubwubwub+glamour+shot

&lt;img src="http://i.stack.imgur.com/tdhvW.png" style="width:40%;height:40%"/&gt;



This is code-golf, shortest code in bytes wins!
PowerShell v4+, 160 bytes



param($a)iwr (((iwr "google.com/search?tbm=isch&amp;q=$($a-replace' ','+')+glamour+shot").links|?{$_.innerhtml-like"*$a*"})[0].innerhtml-split'"')[3] -outf "$a.jpg"


Takes input $a as a string. Does an Invoke-WebRequest (iwr) to the appropriate Google location, using inner-string script block to -replace spaces with + in the input string. We take the .links of that, where the .innerhtml is -like our input string. That yields the links with the proper thumbnail description. Take the first [0] one of those, take its .innerhtml and -split it on quotations. The fourth [3] element is the text inside the img src=" portion, so we do another iwr on that, specifying -outfile to be $a.jpg in the local folder. Since these are just the Google generated thumbnails, they're guaranteed to be jpg.