https://github.com/stil4m/imdb-api
IMDb API
https://github.com/stil4m/imdb-api
Last synced: 6 months ago
JSON representation
IMDb API
- Host: GitHub
- URL: https://github.com/stil4m/imdb-api
- Owner: stil4m
- Created: 2013-07-28T14:34:54.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2020-12-12T10:36:49.000Z (over 4 years ago)
- Last Synced: 2024-10-13T20:10:04.031Z (7 months ago)
- Language: Java
- Size: 36.1 KB
- Stars: 3
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Travis says:
# IMDb API
This is a Java library which can be used to extract little pieces of information of the IMDb. The library uses screen scraping as technique to obtain this data.
## Usage
You have to create a instance of the `IMDB` type. For standard usage, you should do this by using the `IMDBFactory`. The sample code shows this:```
InputStream inputStream = getClass().getResourceAsStream("/nl/stil4m/imdb/parsing.properties");
Properties properties = new Properties();
properties.load(inputStream);
IMDBFactory factory = new IMDBFactory();
IMDB imdb = factory.createInstance(properties);
```The reason you have to provide a `Properties` object to the factory is to allow [external configuration](http://www.kirkk.com/modularity/2009/12/external-configuration/). Because the library uses screen scraping, the library is highly dependent on the HTML layout of the IMDb. The properties file that is loaded from the classpath contains a list of CSS selectors mapped to keys that are used in the code. If the library breaks, you are able to fix the issue by fixing the CSS selector in the `Properties` object before instantiating the the `IMDB` instance. When you do so, please report a [bug](https://github.com/stil4m/imdb-api/issues).
## Advanced Configuration
TODO
## Maven repository
The module is available on my own Maven [repository](https://github.com/stil4m/maven-repository) (hosted on GitHub).