Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

jimmyd-be/imdb-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 Tests

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("/io/github/jimmydbe/imdb/parsing.properties");
Properties properties = new Properties();
properties.load(inputStream);
IMDBFactory factory = new IMDBFactory();
IMDB imdb = factory.createInstance(properties);

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.

Advanced Configuration

TODO

Maven repository

The module is available on the central Maven repository.

<dependency>
    <groupId>io.github.jimmyd-be</groupId>
    <artifactId>imdb-api</artifactId>
    <version>{latest-version}</version>
</dependency>