Menu

#10 Yahoo Script for 4/1 Format Changes

open
nobody
None
5
2004-04-06
2004-04-06
Kevin Jones
No

This patch fixes the problem with Yahoo movie listings
that started on April 1. The Yahoo URLs do not require
specific dates to be entered - they are insterted into
the URL by the script based on directives placed in the
URL in the config file. This patch contains some new
features such as pulling down the IMDb user rating and
properly handling future releases.

Three files are included:

yahoo.pm
getdata.pl
getdata.cfg

Clear your cache before running or it won't work - it's in
the Cache directory. And please make a backup of your
current ShowTimes directory before continuing.

Summary of changes:

yahoo.pm
- Major overhaul to handle the new page format.
- Added logic to put theater features in the Theater
section such as "Handicapped Access", "Cafe on
Premises".
- Added support for unreleased movies - they display
as "Starts on ..." in the Times section.
- The theater phone number is no longer displayed on
the main listings page so it isn't pulled anymore.

getdata.pl
- Handles "invalid" time formats so that times of "Starts
on..." won't break the system when you have sessions
turned on.
- Pulls the user rating from IMDb and lists it alongside
genre in Plot section. Since the user rating changes
over time I also added code to, if desired, refresh the
IMDb data once a week (see REFRESHRATINGS below).

getdata.cfg
- Added new url formats for Yahoo that don't require
entering specific dates.
- Added REFRESHRATINGS parm to force getdata.pl to
refresh plot data once a week.

Let me know if you have any problems.

Discussion

  • Kevin Jones

    Kevin Jones - 2004-04-06

    Zip File

     
  • Nobody/Anonymous

    Logged In: NO

    Works great, except movie showtimes show lots of AM times
    when they should be PM times. Many messages about unable
    to parse time: Friday AM...

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks for the update but there seems to be a lot of minor
    bugs like:
    - virtually all of the movies are stating that they start
    tomorrow thus not giving the times for today.
    - wrong year for movies with the same titles from imdb, ie.
    "dawn of the dead" 1978 version not the 2004 version
    "starsky & hutch" 1975 version instead of 2004 version
    - wrong description for movies with similar titles from
    imdb, ie.
    "the fog of war" is comming up as "the dogs of war"

    I'm not getting any errors with the times (ie. am/pm) like
    the last person though.

    I realy like how you changed the config file so that you
    don't have to put in each individual date...

    thanks!
    Phoenix

     
  • Nobody/Anonymous

    Logged In: NO

    This doesn't work for me. I get a zillion:

    Module 'yahoo': error executing parse:
    Undefined subroutine &main::AddMovieYear called at
    yahoo.pm line 313.

    Help!

     
  • Nobody/Anonymous

    Logged In: NO

    I get the same error:
    Module 'yahoo': error executing parse:
    Undefined subroutine &main::AddMovieYear called at
    yahoo.pm line 313.

     
  • ken poole

    ken poole - 2004-04-10

    Logged In: YES
    user_id=68713

    have you updated both the yahoo.pm and getdata.pl files?
    you need both

     
  • Kevin Jones

    Kevin Jones - 2004-04-10

    Logged In: YES
    user_id=970574

    The problem is that most people downloading the patch are
    still running getdata.exe versus getdata.pl. I am installing the
    PAR compiler now (thanks to Brandon for some guidance) but
    have not yet accomplished the feat.

    So anyone downloading this patch needs to have the
    ActiveState Perl script environment installed
    (http://www.activestate.com/) and run getdata.pl.

    I'll be posting the compiled version soon along with some bug
    fixes.

     
  • Nobody/Anonymous

    Logged In: NO

    Having some of the same problems that others have reported
    -- seems my local theater has started to show a lot of
    things at 1 and 4 in the morning, instead of 1 and 4 in the
    afternoon (displaying AM instead of PM). Also seeing the
    instance of older movie reviews being picked instead of
    reviews for the new movie of the same name ("Dawn of the
    Dead," mentioned below, is a perfect example).

    However, it's working again, which is something!! It's
    terribly slow, particularly to parse that first page, but
    once it finally kicks in it goes fairly quickly -- IMDB
    downloads and parsing are faster than before, I think. And
    I'm not seeing the "unable to parse time" message that
    someone else was seeing.

     
  • Tim Musa

    Tim Musa - 2004-04-14

    Logged In: YES
    user_id=716698

    Just thought I'd through my voice into those receiving wrong time information (am / pm). I also noticed that the theater information no longer shows the address but instead says, "[Add to My Favorite Theaters]", and in some instances adds, "Stadium Seating".

    However, as bentioned below, it is working which is a HUGE step in the right direction. The rest is just fluff.

     
  • Nobody/Anonymous

    Logged In: NO

    still getting the following error

    Module 'yahoo': error executing parse:
    Undefined subroutine &main::AddMovieYear called at
    yahoo.pm line 313.

    Help!!!

     
  • ken poole

    ken poole - 2004-04-16

    Logged In: YES
    user_id=68713

    how are you invoking getdata?
    "perl getdata.pl"?

     

Log in to post a comment.