how to develop a 'theater showtimes' add-on
#1
hi, i would like some suggestions on how to go about developing this add-on. i am testing this on my xbmc-live set-up; i am fairly affluent in bash/ c but unfortunately i dont have experience with python.

google.com/movies seems to have the info i would like to display in xbmc. i use wget to fetch the data from google; the raw data looks like:
Code:
...<a href="http://www.google.com/advanced_search?near=02111">Advanced Search</a><br>&nbsp;&nbsp;<a href="/preferences?hl=en">Preferences</a></font></td></tr></table></td></tr></table></div></div><h1 id=title_bar>Showtimes for Boston, MA 02111</h1><div id=left_nav><form action="/movies" style="padding:0;margin:0"><div class=section style="padding-left:6px"><b>Change Location</b><br><input id=mtq name=near size=13 style="margin-bottom:.1em" type=text value=""><br><input type=submit value="Change"><input type=hidden name=rl value=1><input type=hidden name="stok" value="ABAPP2sJcjlmthCBMuwO_82RdlvXdtKRsQ:1300397804865"></div></form><div class=section><div><b>&rsaquo; Today</b></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;date=1">Tomorrow</a></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;date=2">Saturday</a></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;date=3">Sunday</a></div></div><div class=section><div><b>&rsaquo; All times</b></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;time=1">Morning</a></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;time=2">Afternoon</a></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;time=3">Evening</a></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;time=4">Late</a></div></div><div class=section><div><b>&rsaquo; Theaters</b></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;sort=1">Movies</a></div></div><div class=section><div><b>&rsaquo; Show list view</b></div><div><span class=hidden> &rsaquo; </span><a href="/movies?near=02111&amp;view=map">Show map view</a></div></div></div><div id=results><table border=0 cellpadding=0 cellspacing=0><tr><td><img src="/images/pixel_white.gif" alt="" height=1 width=800></table><div id=movie_results><div class=movie_results><div class=theater><div class=desc id=theater_3004251291321628774><h2 class=name><a href="/movies?near=02111&amp;tid=29b13ea1db3bf866" id=link_1_theater_3004251291321628774>Simons IMAX Theatre at the New England Aquarium</a></h2><div class=info>Central Wharf, Atlantic Ave, Boston, MA - (617) 973-5206<a href="" class=fl target=_top></a></div></div><div class=showtimes><div class=show_left><div class=movie><div class=name><a href="/movies?near=02111&amp;mid=8c6fbadd8807fbb4">Hubble 3D</a></div><span class=info>‎45min‎‎ - Rated G‎‎ - Documentary‎ - <a href="/url?q=http://www.youtube.com/trailer/hubble3d&sa=X&oi=movies&ii=6&usg=AFQjCNHe8JfojImYrqMO7utl0l2RssOOnw" class=fl>Trailer</a> - <a href="/url?q=http://www.imdb.com/title/tt1433813/&sa=X&oi=moviesi&ii=6&usg=AFQjCNEeUAjUscTirIUeigKjdl0UWlUaHg" class=fl>IMDb</a> - <nobr><a href="" class=fl></a>: <nobr><img src="/images/sy-star-on.gif" width=10 height=9 border=0 alt="Rated 3.9 out of 5.0"><img src="/images/sy-star-on.gif" width=10 height=9 border=0 alt=""><img src="/images/sy-star-on.gif" width=10 height=9 border=0 alt=""><img src="/images/sy-star-on.gif" width=10 height=9 border=0 alt=""><img src="/images/sy-star-off.gif" width=10 height=9 border=0 alt=""></nobr></nobr></span><div class=times>10:00am</div></div><div class=movie><div class=name><a href="/movies?near=02111&amp;mid=89423f41bf41b915">Sea Rex: Journey To A Prehistoric World 3D</a></div><span class=info>‎45min‎‎ - Documentary‎ - <a href="/url?q=http://www.imdb.com/title/tt1529567/&sa=X&oi=moviesi&ii=6&usg=AFQjCNFjqckFwd03xYT29_j62ra2M0d9Jg" class=fl>IMDb</a></span><div class=times>12:00&nbsp; 5:00pm</div>...
i trimmed the data using this bash 1-liner so the output looks like:
Code:
xbmc@XBMCLive:~$ wget -q --output-document=- www.google.com/movies | sed -n 3p |   tr '\<' "\n" | egrep "(title_bar|id=link_1_theater|class=info|mid=|Rated|class=times|fandango)" | grep -v ^style | sed s/alt=/\>/ | awk -F \> '{print $2}' | sed s/\&....../" "/g
Showtimes for Boston, MA 02111
Simons IMAX Theatre at the New England Aquarium
Central Wharf, Atlantic Ave, Boston, MA - (617) 973-5206
Hubble 3D
45min   - Rated G   - Documentary  -
"Rated 3.9 out of 5.0"
10:00am
Sea Rex: Journey To A Prehistoric World 3D
45min   - Documentary  -
12:00 5:00pm
Under the Sea 3D
40min   - Rated G   - Documentary  -
"Rated 3.8 out of 5.0"
11:00am 2:00 4:00 6:00pm
Tron Legacy: An IMAX 3D Experience
2hr 7min   - Rated PG   - Action/Adventure/Scifi/Fantasy  -
"Rated 3.7 out of 5.0"
7:15pm
Dolphins and Whales 3D: Tribes of the Ocean
42min   - Rated G   - Documentary  -
"Rated 4.0 out of 5.0"
1:00 3:00pm
ArtsEmerson::Film
559 Washington St, Boston, MA - (617) 824-8000
The Sun Also Rises
2hr 10min   - Drama  -
"Rated 0.0 out of 5.0"
7:30pm
AMC Loews Boston Common 19
175 Tremont Street, Boston, MA - (888) 262-4386
Battle: Los Angeles
1hr 56min   - Rated PG-13   - Action/Adventure/Scifi/Fantasy  -
"Rated 2.8 out of 5.0"
11:15am 12:45 3:25 4:45
6:10
7:00
7:30
8:55
9:45
10:30pm
Rango
1hr 47min   - Rated PG   - Animation/Action/Adventure  -
"Rated 3.5 out of 5.0"
11:10am 1:50 2:45 4:30 5:20
7:15
8:00
9:55
10:35pm
Red Riding Hood
1hr 40min   - Rated PG-13   - Drama  -
"Rated 2.5 out of 5.0"
11:05am 12:40 2:10 3:30 5:00
7:45
10:20
11:05pm
The Adjustment Bureau
1hr 46min   - Rated PG-13   - Romance/Scifi/Fantasy  -
"Rated 3.6 out of 5.0"
11:25am 12:55 1:55 3:35 4:25
6:05
7:10
8:50
9:50pm
Mars Needs Moms in Disney Digital 3D
1hr 28min   - Rated PG   - Animation/Action/Adventure/Comedy
2:30 4:50pm
Beastly
1hr 35min   - Rated PG-13   - Romance/Drama  -
"Rated 3.6 out of 5.0"
12:35 2:50 5:05
7:25
9:30pm
Hall Pass
1hr 38min   - Rated R   - Comedy  -
"Rated 3.1 out of 5.0"
12:05pm
Just Go With It
1hr 50min   - Rated PG-13   - Comedy/Romance  -
"Rated 3.3 out of 5.0"
11:00am 1:40 4:35
7:40
10:20pm
The King Speech
1hr 51min   - Rated R   - Drama  -
"Rated 4.6 out of 5.0"
1:00 3:45
6:30
9:20pm
Unknown
1hr 49min   - Rated PG-13   - Drama/Suspense/Thriller  -
"Rated 3.3 out of 5.0"
1:15 4:00
7:20
10:00pm
I Am Number Four
1hr 44min   - Rated PG-13   - Action/Adventure/Suspense/Thriller  -
"Rated 3.0 out of 5.0"
12:50
6:15pm
Gnomeo  uliet 3D
...
at this point i am seeking help on how to get this data displayed when the add-on is run.

in the future i also would like to support:
- playing movie trailers from youtube.
- displaying the movie poster.
- showing times for the next day.
- showing a list of theaters for a selected movie (instead of displaying a list of movies for each theater).

thank you,
schneidz
Reply
#2
Did you get anywhere with this?
Reply
#3
yeah, my first shaky steps into xbmc programming:
http://hyper.homeftp.net/xbmc/
Reply

Logout Mark Read Team Forum Stats Members Help
how to develop a 'theater showtimes' add-on0