Make a Yahoo Movies! Plugin

I hacked this up today after having to search the nth time through movie listings for my movie. I hope you find it useful. This plugin searches lists all the movie theatres in the area which are showing a given movie, plus show times, addresses, phone numbers, and other information.

The first thing you need to do is to create a .src file in your Note Pad, with the text below. Whitespace doesn't matter -- except inside quoted areas, where it's critical, so watch out! The single item you'll definitely need to change is the zip code (20878) in the line

     <input name="z" value="20878">

...you'll need to set this to the zip code in the area where you're searching. You may also want to change the search name and description to strings that you think are more fitting for your personal Yahoo movie searcher.

After you have created this in the note pad, go to the routing menu for this note and choose "Add to Hemlock Engines". If Hemlock can properly parse this plugin, it'll add it to the engines silently, otherwise it'll pop up a warning message saying that it had failed.

Note that there's a bug in Yahoo's movie search mechanism -- sometimes too exact a title will get you no answers back (for example, searching for "The Matrix" failed to find anything, but searching for "Matrix" nailed it exactly). And too vauge of a title, where more than one movie could be under that title, may also fail. Go figure!

If you're too lazy to type all this in :-) you can instead download it as a Hemlock engine here. Then you can export it to the Note Pad by choosing "Send to Notes" from Hemlock's routing menu.



# Yahoo Movies (Localized)
# Sherlock Plug-In
# Sean Luke
# June 10, 1999

# Comments are lines which begin with a "#" -- you can eliminate them

# The search tag tells Hemlock basic information about where to issue queries
# change the name and description as you see fit
<search
     name = "Yahoo Movies: D.C."
     description = "Movies near Sean's house"
     method = "GET"
     action = "http://movies.yahoo.com/showtimes/showtimes.html"
>


# The input tags tell Hemlock what additional items to put on the URL
# line (everything after the "?", and separated by "&"'s)
# the z value is your zip code -- change it as appropriate
     <input name="z" value="20878">
     <input name="r" value="adv">
     <input name="m" user>
     <input name="t" value="">
     <input name="a" value="">
     <input name="dt" value="0">
     <input name="s" value="tm">
     <input name="p" value="4">


# The interpret tag tells Hemlock how to parse the results.  Watch out
# below: one of the attributes (resultListStart), is wraped with *single*
# quotes, not double-quotes.  This is because the data inside of it
# contains double quotes
     <interpret
          resultListStart='<table width="585"'                
          resultListEnd="<!-- movies module -->"
          resultItemStart="</A><Br>"
          resultItemEnd="<p>"
     >

</search>