71

郵便番号で映画の上映時間にアクセスするための (できれば無料の) サポートされている API を知っている人はいますか?

netflix や imdb などの既存の API がこの情報を提供しているとは思えません。

4

13 に答える 13

15

「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();
?>
于 2011-02-04T11:03:12.363 に答える
8

そう、Yahoo はどうやら 2009 年 11 月にシークレット ムービー API を削除したようです。
誰もが TMS Data Direct からデータを取得しているようです: http://www.tmsdatadirect.com/

于 2009-11-23T21:19:01.117 に答える
6

GoogleがそれをAPIとして公開しているかどうかはわかりませんが、これはあなたが望むものとよく似ています。 http://www.google.com/movies?hl=en&near=90210&dq=movie+times+90210&sa=X&oi=showtimes&ct=title&cd=1

于 2009-01-13T17:16:38.417 に答える
2

申し訳ありませんが、質問を投稿する前にもう少し検索する必要がありました。

del.icio.us でクリエイティブな検索を行ったところ、文書化されていない yahoo! が明らかになりました。ムービー API (サンプル API 呼び出し)。

いい感じ。

于 2009-01-13T18:34:54.437 に答える
2

Fandango には、近くにある映画を検索できる RSS フィードがあるようです。

それらはここにあります:

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

于 2011-08-01T14:37:48.847 に答える
1

少し調べてみたところ、Dapper (open.dapper.net) がこの種のフィードを作成するための優れたソリューションであることがわかりました...

これは私が作成したフィードで、映画のタイトルと郵便番号をパラメーターとして受け取ります。(その他のほとんどは、ZIP で検索するだけで利用できます)

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

設定に5分ほどかかりました…

于 2009-08-06T10:16:21.087 に答える
1

これから html をスクレイピングすることが合法かどうかはわかりませんが、これは私が見つけた最もクリーンな疑似 API です。http://opensocial.flixster.com/igoogle/showtimes?date=20111025&postal=23226 - 次のようなもので html をスクレイピングするだけです...

$('div.showtime', response).each(function() {
   // ... process each showtime div
});
于 2011-10-25T14:33:31.153 に答える
1

私も合法的にスクレイピングして再公開できる上映時間を探しています。Yahoo は、営利目的でなければ禁止されていないように聞こえますが、それは私の希望的観測かもしれません。

あなたは 、Yahoo ! サービス

于 2010-01-03T21:02:50.263 に答える
0

見つかりません。

Yahooムービーからスクリーンスクレイピングを試すことができます: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
于 2009-01-13T17:15:41.680 に答える
0

私も上映時間 API を探していましたが、あなたと同じように、映画の上映時間に適した 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/

于 2010-01-21T21:44:26.687 に答える
0

私の推測では、(これらの人が RSS フィードを持っていない限り) そのための最善の策は、正規表現をサポートする言語で HTML をスクレイピングすることでしょう。

それは醜いことであり、彼らがコードを変更するたびに、あなたのコードが壊れる可能性があります。

于 2009-01-13T17:13:22.137 に答える
-1

私はこれが少し古いことを知っています。このための API はまだないと思いますが、一部のプロバイダーはこのサービスを提供しています。West World Mediaをご覧になることをお勧めします。

于 2012-02-06T18:00:44.183 に答える
-3
http://www.google.com/ig/api?movies=YOUR_ZIP_HERE

ニックに感謝します。それが私が使用するリンクです。

于 2011-02-16T18:24:51.143 に答える