有电影showtime api吗?

有没有人知道任何(最好是免费的)支持的API访问电影放映时间的邮政编码?

我不相信任何现有的API,如netflix或imdb,提供这些信息。

当“allow_url_fopen”被禁用,然后使用

<?php /** * Google Showtime grabber * * This file will grab the last showtimes of theatres nearby your zipcode. * Please make the URL your own! You can also add parameters to this URL: * &date=0|1|2|3 => today|1 day|2 days|etc.. * &start=10 gets the second page etc... * * Please download the latest version of simple_html_dom.php on sourceForge: * http://sourceforge.net/projects/simplehtmldom/files/ * * @author Bas van Dorst <info@basvandorst.nl> * @version 0.1 * @package GoogleShowtime * * @modifyed by stephen byrne <gold.mine.labs@gmail.com> * @GoldMinelabs.com */ require_once('simple_html_dom.php'); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://www.google.ie/movies?near=dublin'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); $str = curl_exec($curl); curl_close($curl); $html = str_get_html($str); print '<pre>'; foreach($html->find('#movie_results .theater') as $div) { // print theater and address info print "Theate: ".$div->find('h2 a',0)->innertext."\n"; //print "Address: ". $div->find('.info',0)->innertext."\n"; // print all the movies with showtimes foreach($div->find('.movie') as $movie) { print "Movie: ".$movie->find('.name a',0)->innertext.'<br />'; print "Time: ".$movie->find('.times',0)->innertext.'<br />'; } print "\n\n"; } // clean up memory $html->clear(); ?> 

是的,雅虎显然在2009年11月删除了他们的秘密电影API。
看来每个人都从TMS Data Direct获得他们的数据: http : //www.tmsdatadirect.com/

不知道Google是否将其公开为api,但这看起来很像你想要的。 http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1

对不起,在发布这个问题之前应该多查找一下。

del.icio.us上的一些创意search已经揭示了一个无证的雅虎! 电影API( 样本API调用 )。

看起来不错。

看了一下后,我发现Dapper(open.dapper.net)是创build这种types的feed的一个很好的解决scheme…

以下是我制作的供稿,以电影标题和邮编为参数。 (其他大多数只能通过ZIPsearch)

http://www.dapper.net/dapp-howto-use.php?dappName=GoogleMoviesbynameANDzip

花了约5分钟成立…

我的猜测是,你最好的select(除非这些人有RSS提要)将是用一种支持正则expression式的语言来刮擦HTML。

请注意,这是丑陋的,每次他们改变他们的代码,你的 – 可以打破。

我找不到一个。

您可以尝试从雅虎电影屏幕抓取: http : //movies.yahoo.com/showtimes/movie? z=60630&date=20090113&mid= 1810038822

 z = zip code date = year + month + day (as a string) mid = movieID, which you will have to grab from Yahoo Movies 

我也在寻找放映时间,我可以合法地刮和重新发布。 雅虎的声音就好像你不是为了商业目的而做的,也没有被禁止……或者这也是我的一厢情愿。

您同意不出于任何商业目的复制,复制,复制,出售,交易,转售或利用任何部分,使用或访问Yahoo! 服务

我也在寻找一个showtime API,和你一样,我没有find一个好的电影放映时间API。 我决定根据Google Showtimes编写我自己的“showtime API”。 请检查一下。

这是一个简单的PHP脚本,但“它做它应该做的”:

  <?php /** * Google Showtime grabber * * This file will grab the last showtimes of theatres nearby your zipcode. * Please make the URL your own! You can also add parameters to this URL: * &date=0|1|2|3 => today|1 day|2 days|etc.. * * Please download the latest version of simple_html_dom.php on sourceForge: * http://sourceforge.net/projects/simplehtmldom/files/ * * @author Bas van Dorst <info@basvandorst.nl> * @version 0.1 * @package GoogleShowtime */ require_once('simple_html_dom.phps'); $html = new simple_html_dom(); $html->load_file('http://www.google.nl/movies?mid=&hl=en&near=1400AB'); print '<pre>'; foreach($html->find('#movie_results .theater') as $div) { // print theater and address info print "Theate: ".$div->find('h2 a',0)->innertext."\n"; print "Address: ". $div->find('.info',0)->innertext."\n"; // print all the movies with showtimes foreach($div->find('.movie') as $movie) { print "\tMovie: ".$movie->find('.name a',0)->innertext.'<br />'; print "\tTime: ".$movie->find('.times',0)->innertext.'<br />'; } print "\n\n"; } // clean up memory $html->clear(); ?> 

例如:http:// code.basvd.nl/showtime_grabber_0.1/Google_showtime.php

下载simple_html_dom.php:http:// code.basvd.nl/showtime_grabber_0.1/

Fandango似乎有RSS源,可以让你search你附近的电影。

http://www.fandango.com/rss/moviefeed

不知道是否合法刮从这个HTML,但它是我find的最干净的伪API。 http://opensocial.flixster.com/igoogle/showtimes?date=20111025&postal=23226 – 只是刮像一些像…

 $('div.showtime', response).each(function() { // ... process each showtime div }); 

我知道这有点旧了。 我不认为有这样的API,但一些提供商提供这种服务。 我build议你看看西方世界媒体。

 http://www.google.com/ig/api?movies=YOUR_ZIP_HERE 

感谢尼克。 这是我将要使用的链接。