是否有影片放映API? [关闭] 是否有影片放映API? [关闭](Is there a mo

2019-05-12 19:18发布

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

我不相信任何现有的API,如Netflix公司或IMDB,提供这些信息。

Answer 1:

当“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();
?>


Answer 2:

是的,雅虎显然删除他们的秘密电影API在2009年11月。
似乎每个人都从TMS数据直接得到他们的数据: http://www.tmsdatadirect.com/



Answer 3:

不知道谷歌公开它作为一个API,但是这看起来很像你想要什么。 http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1



Answer 4:

对不起,应该已经搜查多一点张贴问题之前。

一些在del.icio.us上创造性的搜索揭示了一个未公开的雅虎! 电影API( 样本API调用 )。

看起来不错。



Answer 5:

看着周围一点点后,我发现了Dapper(open.dapper.net)是创建这种类型的饲料很好的解决方案...

这是我做的饲料,这需要电影标题和邮政编码作为参数。 (可大多数人只能通过ZIP搜索)

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

花了大约5分钟,成立...



Answer 6:

我也是找我放映时间可以合法地刮,并重新发布。 雅虎的声音一样,如果你不用于商业用途做到这一点,它不禁止......或者也许这是我一厢情愿的想法。

您同意不复制,复制,拷贝,销售,交易,转售或用于任何商业用途 ,于雅虎的任何部分或使用,或访问 服务



Answer 7:

我的猜测是对你最好的选择(除非这些家伙有RSS源)将与支持正则表达式语言刮HTML。

你要知道,这是丑陋和每次改变他们的代码的时候,你-could-打破。



Answer 8:

我找不到一个。

你可以从雅虎电影尝试屏幕抓取: 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


Answer 9:

我也一直在寻找一个欣欣API和你一样,我还没有找到电影放映时间了良好的API。 我决定写我自己的“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/



Answer 10:

凡丹戈似乎有让你搜索你附近的电影RSS源。

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



Answer 11:

不知道是否是合法的刮从这个HTML,但是,它是最干净的伪API,我发现。 http://opensocial.flixster.com/igoogle/showtimes?date=20111025&postal=23226 -刚刮的HTML喜欢的东西...

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


Answer 12:

我知道这是一个有点老。 我不认为有这个的API还没有,但有些供应商提供这种服务。 我建议你看看西方世界媒体。



Answer 13:

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

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



文章来源: Is there a movie showtime api? [closed]
标签: api movies