Scans an Open Directory containing movies and looks them up on IMDB.
- Install
docker
anddocker-compose
. - Run (UNIX):
wget https://raw.githubusercontent.com/jaeseopark/od-imdb/master/docker-compose-production.yml docker-compose.yml docker-compose up -d
- (Optional) Install the Chrome extension in
browser-extension/
.
curl --request POST "http://localhost:2014/api/update"
Using a well-established third party API for the lookup will improve a number of things such as:
- the relevance of the search results;
- the latency of the search; and
- the access to recently released titles.
TODO: write about https://imdb-api.com/
You can bring your own implementations of OdParser
, Repository
, or UpdatableRepository
:
pip install od-imdb
from typing import List
from od_imdb.repository.interface import Repository
from od_imdb.interface import OdFileEntity
from od_imdb.od_imdb import OdImdb
from od_imdb.od_parser.interface import OdParser
class MyCustomParser(OdParser):
def get_entities(self, url: str) -> List[OdFileEntity]:
return [...]
class MyCustomRepository(Repository):
def decorate_safe(self, entities: List[OdFileEntity]):
for entity in entities:
my_awesome_lookup_algorithm(entity)
custom_parser = MyCustomParser()
custom_repo = MyCustomRepository()
od_imdb = OdImdb(od_parser=custom_parser, repository=custom_repo)
od_imdb.lookup("http://foo.bar/folder123/")
docker-compose up --build