Skip to content

Commit

Permalink
Updated to 5.5.20.
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianBeiner committed Aug 24, 2014
1 parent 663cfc7 commit a714aff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ Did you know about the available IMDb.com API? The price to use it is around $15

---

**If you want to thank me for my work and the support, feel free to do this through PayPal (use [email protected] as payment destination) or just buy me a book at [Amazon](http://www.amazon.de/registry/wishlist/8840JITISN9L) – thank you! :-)**
**If you want to thank me for my work and the support, feel free to buy me a book or something at [Amazon](http://www.amazon.de/registry/wishlist/8840JITISN9L) – thank you! :-)**

## License

Since version 5.5.0 the script is licensed under [CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/).

## Changes

5.5.20
- Updated lots of the IMDB_* constants. *(Thanks to bla0r)*
- Fixed Runtime (issue #46).
- Improved the regular expressions.

5.5.19
- Fixed IMDB_FULL_CAST and IMDB_YEAR.
- getSitesAsUrl() only returns a link, if the url starts with "http".
Expand Down
20 changes: 10 additions & 10 deletions imdb.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,42 @@ class IMDB {
const IMDB_AKA = '~Also Known As:</h4>(.*)<span~Ui';
const IMDB_ASPECT_RATIO = '~Aspect Ratio:</h4>(.*)</div>~Ui';
const IMDB_BUDGET = '~Budget:</h4>(.*)<span~Ui';
const IMDB_CAST = '~itemprop="actor"(?:.*)><a href="/name/nm(\d+)/(?:.*)"(?:\s*)itemprop=\'url\'> <span class="itemprop" itemprop="name">(.*)</span>~Ui';
const IMDB_CAST = '~itemprop="actor"(?:.*)><a href="/name/nm(\d+)/(?:.*)"(?:\s*)itemprop=\'url\'>(?:\s*)<span class="itemprop" itemprop="name">(.*)</span>~Ui';
const IMDB_FULL_CAST = '~<span class="itemprop" itemprop="name">(.*?)</span>~Ui';
const IMDB_CHAR = '~<td class="character">\s+<div>(.*)</div>\s+</td~Ui';
const IMDB_CHAR = '~<td class="character">(?:\s*)<div>(.*)</div>(?:\s*)</td~Ui';
const IMDB_COLOR = '~href="/search/title\?colors=(?:.*)"(?:\s*)itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_COMPANY = '~Production Co:</h4>(.*)</div>~Ui';
const IMDB_COMPANY_NAME = '~href="/company/co(\d+)(?:\?.*)"(?:\s*)itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_COUNTRY = '~href="/country/(\w+)\?(?:.*)"(?:\s*)itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_CREATOR = '~(?:Creator|Creators):</h4>(.*)</div>~Ui';
const IMDB_DESCRIPTION = '~<p itemprop="description">(.*)(?:<a|<\/p>)~Ui';
const IMDB_DIRECTOR = '~(?:Director|Directors):</h4>(.*)</div>~Ui';
const IMDB_GENRE = '~href="/genre/(.*)(?:\?.*)"(?:\s+|)>(.*)</a>~Ui';
const IMDB_GENRE = '~href="/genre/(.*)(?:\?.*)"(?:\s*)>(.*)</a>~Ui';
const IMDB_ID = '~(tt\d{6,})~';
const IMDB_LANGUAGES = '~href="/language/(.*)(?:\?.*)"(?:\s*)itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_LOCATION = '~href="/search/title\?locations=(.*)(?:&.*)"itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_MPAA = '~span itemprop="contentRating"(?:.*)>(.*)</span~Ui';
const IMDB_NAME = '~href="/name/nm(\d+)/(?:.*)"(?:\s*)itemprop=\'(?:\w+)\'><span class="itemprop" itemprop="name">(.*)</span>~Ui';
const IMDB_OPENING = '~Opening Weekend:</h4>(.*)\(~Ui';
const IMDB_PLOT = '~Storyline</h2>\s+<div class="inline canwrap" itemprop="description">\s+<p>(.*)(?:<em|<\/p>|<\/div>)~Ui';
const IMDB_PLOT = '~Storyline</h2>(?:\s*)<div class="inline canwrap" itemprop="description">(?:\s*)<p>(.*)(?:<em|<\/p>|<\/div>)~Ui';
const IMDB_POSTER = '~"src="(.*)"itemprop="image" \/>~Ui';
const IMDB_RATING = '~<span itemprop="ratingValue">(.*)</span>~Ui';
const IMDB_REDIRECT = '~Location:\s(.*)~';
const IMDB_REDIRECT = '~Location:(?:\s*)(.*)~';
const IMDB_RELEASE_DATE = '~Release Date:</h4>(.*)(?:<span|<\/div>)~Ui';
const IMDB_RUNTIME = '~Runtime:</h4>\s+<time itemprop="duration" datetime="(?:.*)">(.*)</time>~Uis';
const IMDB_SEARCH = '~<td class="result_text"> <a href="\/title\/tt(\d+)\/(?:.*)"(?:\s+|)>(.*)<\/a>~Uis';
const IMDB_SEASONS = '~Season:</h4>\s+<span class="see-more inline">(.*)</span>\s+</div>~Ui';
const IMDB_RUNTIME = '~<time itemprop="duration" datetime="(?:.*)"(?:\s*)>(?:\s*)(.*)</time>~Uis';
const IMDB_SEARCH = '~<td class="result_text"> <a href="\/title\/tt(\d+)\/(?:.*)"(?:\s*)>(.*)<\/a>~Uis';
const IMDB_SEASONS = '~Season:</h4>(?:\s*)<span class="see-more inline">(.*)</span>(?:\s*)</div>~Ui';
const IMDB_SITES = '~Official Sites:</h4>(.*)(?:<a href="officialsites|</div>)~Ui';
const IMDB_SITES_A = '~href="(.*)" itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_SOUND_MIX = '~Sound Mix:</h4>(.*)</div>~Ui';
const IMDB_SOUND_MIX_A = '~href="/search/title\?sound_mixes=(?:.*)"(?:\s*)itemprop=\'url\'>(.*)</a>~Ui';
const IMDB_TAGLINE = '~Taglines:</h4>(.*)(?:<span|<\/span>|</div>)~Ui';
const IMDB_TITLE = '~property=\'og:title\' content="(.*) \((?:.*)\)"~Ui';
const IMDB_TITLE_ORIG = '~<span class="title-extra" itemprop="name">(.*)<i>\(original title\)<\/i>\s+</span>~Ui';
const IMDB_TITLE_ORIG = '~<span class="title-extra" itemprop="name">(.*)<i>\(original title\)<\/i>(?:\s*)</span>~Ui';
const IMDB_TRAILER = '~href="/video/(.*)/(?:\?.*)"(?:.*)itemprop="trailer">~Ui';
const IMDB_URL = '~http://(?:.*\.|.*)imdb.com/(?:t|T)itle(?:\?|/)(..\d+)~i';
const IMDB_VOTES = '~<span itemprop="ratingCount">(.*)</span>~Ui';
const IMDB_YEAR = '~<h1 class="header">(?:\s+)<span class="itemprop" itemprop="name">(?:.*)</span>(?:\s+)<span class="nobr">\((.*)\)</span>~Ui';
const IMDB_YEAR = '~<h1 class="header">(?:\s*)<span class="itemprop" itemprop="name">(?:.*)</span>(?:\s*)<span class="nobr">\((.*)\)</span>~Ui';
const IMDB_WRITER = '~(?:Writer|Writers):</h4>(.*)</div>~Ui';

// cURL cookie file.
Expand Down

0 comments on commit a714aff

Please sign in to comment.