有电影放映时间 api 吗?

发布于 2024-07-11 08:59:55 字数 96 浏览 6 评论 0原文

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

我不相信任何现有的 api(例如 netflix 或 imdb)提供此信息。

Does anyone know of any (preferrably free) supported api's for accessing movie showtimes by zip code?

I don't believe any existing api's, such as netflix or imdb, provide this information.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

差↓一点笑了 2024-07-18 08:59:56

当“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 <[email protected]>
 * @version 0.1 
 * @package GoogleShowtime
 *
 * @modifyed by stephen byrne <[email protected]>
 * @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();
?>

when "allow_url_fopen" is disabled then use

    <?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 <[email protected]>
 * @version 0.1 
 * @package GoogleShowtime
 *
 * @modifyed by stephen byrne <[email protected]>
 * @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();
?>
鹿港巷口少年归 2024-07-18 08:59:56

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

Yep, Yahoo apparently removed their secret movie API in November 2009.
It seems everyone gets their data from TMS Data Direct: http://www.tmsdatadirect.com/

睫毛溺水了 2024-07-18 08:59:56

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

Don't know if Google exposes it as an api but this looks a lot like what you want.
http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1

桃酥萝莉 2024-07-18 08:59:56

抱歉,在发布问题之前应该多搜索一下。

一些创意在 del.icio.us 上搜索发现了一个未记录的 yahoo! 电影 api(示例 api 调用)。

看起来不错。

sorry, should've searched a bit more before posting the question.

some creative searching on del.icio.us has revealed an undocumented yahoo! movies api (sample api call).

looks nice.

装迷糊 2024-07-18 08:59:56

环顾四周后,我发现 Dapper (open.dapper.net) 是创建此类提要的绝佳解决方案...

这是我制作的提要,它采用电影标题和邮政编码作为参数。 (大多数其他内容只能通过 ZIP 搜索)

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

大约需要 5 分钟来设置...

After looking around a little bit, I found Dapper (open.dapper.net) to be a great solution for creating this type of feed...

Here is the feed I made, which takes a movie title and a zip code as parameters. (most others available only searched by ZIP)

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

took about 5 minutes to set up...

芸娘子的小脾气 2024-07-18 08:59:56

我也在寻找可以合法抓取和重新发布的放映时间。 雅虎听起来好像如果你不出于商业目的这样做,就不会被禁止……或者也许这只是我的一厢情愿。

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

I too am looking for showtimes I can legitimately scrape and republish. Yahoo's sound like if you don't do it for commercial purposes, it's not prohibited... or maybe that's wishful thinking on my part.

You agree not to reproduce, duplicate,
copy, sell, trade, resell or exploit
for any commercial purposes, any
portion or use of, or access to, the
Yahoo! Services

为你拒绝所有暧昧 2024-07-18 08:59:56

不确定从中抓取 html 是否合法,但是,这是我发现的最干净的伪 API。 http://opensocial.flixster.com/igoogle/showtimes?date=20111025& ;postal=23226 - 只需使用类似...的内容抓取 html

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

Not sure if it's legal to scrape the html from this, but, it's the cleanest pseudo-API I've found. http://opensocial.flixster.com/igoogle/showtimes?date=20111025&postal=23226 - just scrape the html with something like...

$('div.showtime', response).each(function() {
   // ... process each showtime div
});
请帮我爱他 2024-07-18 08:59:56

Fandango 似乎有 RSS 源,可让您搜索附近的电影。

它们可以在这里找到:

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

Fandango seems to have RSS feeds that allow you to search for movies near you.

They can be found here:

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

深府石板幽径 2024-07-18 08:59:56

我的猜测是,对此(除非这些人有 RSS 源)最好的选择是使用支持正则表达式的语言来抓取 HTML。

请注意,这很丑陋,每次他们更改代码时,您的代码都可能会崩溃。

My guess is that your best bet on that (unless these guys have RSS feeds) would be to scrape the HTML with a language that supports regular expressions.

Mind you, that's ugly and every time they change their code, yours -could- break.

将军与妓 2024-07-18 08:59:56

我找不到一个。

您可以尝试从雅虎电影进行屏幕抓取:
http://movies.yahoo.com/showtimes/电影?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

I can't find one.

You could try screen-scraping from Yahoo Movies:
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
怕倦 2024-07-18 08:59:56

我也在寻找放映时间 API,和您一样,我还没有找到适合电影放映时间的良好 API。 我决定基于 Google Showtime 编写自己的“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 <[email protected]>
 * @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/

I was also looking for a showtime API, and like you, I have not found a good API for the movie showtimes. I decided to write my own "showtime API", based on the Google Showtimes. Please check it out.

It is a simple PHP-script, but "it does what it should do":

    <?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 <[email protected]>
 * @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();

?> 

Example:
http:// code.basvd.nl/showtime_grabber_0.1/Google_showtime.php

Download simple_html_dom.php:
http:// code.basvd.nl/showtime_grabber_0.1/

夜唯美灬不弃 2024-07-18 08:59:56

我知道这有点旧了。 我认为还没有可用的 API,但有些提供商确实提供了这项服务。 我建议你看看西方世界传媒。

I know this is a bit old. I don't think there is an api for this yet but some providers do offer this service. I suggest you look at West World Media.

屋檐 2024-07-18 08:59:56
http://www.google.com/ig/api?movies=YOUR_ZIP_HERE

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

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

Thanks to Nick. that's the link I will be using.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文