Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Movie time macro! Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: July 01 2006 at 12:04 | IP Logged Quote nadler

I decided to try my hand at it. Below is a Movie Time macro prototype. It gets the first 3 movies for my local theater and the movie times. For additional movies and times I will zero out the local variable and use them over. If anyone, after looking this over, has a faster, better, quicker, more seemly way, please Post it!

insert into macroheader values ('GET MOVIES','GET MOVIES',0,0,1);
insert into macrodetail values ('GET MOVIES',1,15,'[LOCAL1] ',NULL,'ph_geturl("http://movies.aol.com/showtimes/closestth eaters.adp?setGeodata=409322+%2d731052+ZIP+%7b%7d+%7bEAST+SE TAUKET%7d+%7b%7d+11733+SUFFOLK+US+EST5EDT+NY+%2eeastsetauket +newyork#549")',0,'');
insert into macrodetail values ('GET MOVIES',2,37,'',NULL,'The next line snaps out the name of the movie theatre.',0,'');
insert into macrodetail values ('GET MOVIES',3,15,'[LOCAL2]',NULL,'ph_regexsnap("AMC\(.+\)</a>","[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',4,37,'',NULL,'The next line uses the regexdiff function to get the humidity.',0,'');
insert into macrodetail values ('GET MOVIES',5,15,'[LOCAL3]',NULL,'ph_regexsnap("<tr>~255\(.+\)</a>","[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',6,37,'',NULL,'The next line gets the first movie name.',0,'');
insert into macrodetail values ('GET MOVIES',7,15,'[LOCAL4]',NULL,'ph_regexdiff("11790~255<h5>","</a>","[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',8,37,'',NULL,'The next line gets the movie times that are available.',0,'');
insert into macrodetail values ('GET MOVIES',9,15,'[LOCAL5]',NULL,' ph_regexdiff(''11790~255</h5>~255<ul><li>' ',''</li>~255</ul>''," [LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',10,9,'',NULL,'"Playing at [LOCAL2] ~r~n.Movie Name:[LOCAL4]~r~n.TIMES: [LOCAL5]."',0,'');
insert into macrodetail values ('GET MOVIES',11,15,'[LOCAL6]',NULL,'ph_regexdiff(''[LOCAL2]~255<h5>'',''</a>'',"[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',12,15,'[LOCAL7]',NULL,' ph_regexdiff(''11790~255[LOCAL6]~255<ul><li>'',''</li>~255</ul>'',"[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',13,9,'',NULL,'"Movie.[LOCAL6]~r~n.Times. [LOCAL7]"',0,'');
insert into macrodetail values ('GET MOVIES',14,15,'[LOCAL8]',NULL,'ph_regexdiff(''[LOCAL6]~255<h5>'',''</a>'',"[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',15,15,'[LOCAL9]',NULL,' ph_regexdiff(''11790~255[LOCAL8]~255<ul><li>'',''</li>~255</ul>'',"[LOCAL1]",1,0)',0,'');
insert into macrodetail values ('GET MOVIES',16,9,'',NULL,'".Movie.[LOCAL8] .Times.[LOCAL9]"',0,'');


Edited by nadler - July 01 2006 at 13:28
Back to Top View nadler's Profile Search for other posts by nadler
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: July 01 2006 at 12:58 | IP Logged Quote TonyNo

I'll check that out.

Depending on what you do with it, my version may work for you, too. I don't scrape, I just link to a search page on Fandango.com in one of my main page frames...

http://www.fandango.com/TheaterListings.aspx?location=[ZIPCODE]
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum