Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 1.55 KB

File metadata and controls

102 lines (81 loc) · 1.55 KB

IMDB Titles

Simple fetcher for get target tittles with basic infos from IMDb

Requirements

docker or go

Build

For get imdb binary in folder, you can use:

make build

Test

Run all tests

make check

Test with args

for pass args to test

make check-args args="-v genrer/*.go -run TestParse"
# or
make check-args args="./... -bench Parse"

Run

By default will get the 500 most rating titles from each genre:

make run

Run with options

Options for pass as var for the fetcher change default action.

imdb -h

for pass args to makefile you can set flags in var args:

make run args='--limit=1000 --sort="num_votes,asc" --debug --adult=false'

Change limit

for change max limit, you can use flag limit

imdb --limit=1000

Remove adult results

for prevent adult titles you can use flag adult

imdb --adult=false

Change sort

if you need change sort, you can use flag sort

imdb --sort="num_votes,asc"

Debug mode

for activate debug mode, you can use flag debug

imdb --debug

Output

Output will be in jsonlines and writed inside a results folder in current path

for see results, you can use:

ls results/*.jsonl

Example

{
  "Name": "Apenas Um Show",
  "Episode": "A Regular Epic Final Battle",
  "Year": "(2009–2017)",
  "Genres": [
    "animation",
    "action",
    "adventure"
  ],
  "Rating": {
    "Value": 9.9,
    "Best": 10,
    "Count": 571,
    "Position": 1
  }
}