An IMDb scraper in GO.
go.mod | ||
go.sum | ||
imdb-scraper_test.go | ||
imdb-scraper.go | ||
LICENSE | ||
models.go | ||
README.md |
IMDB-Scraper
An IMDb scraper in GO.
Usage
import (
"git.0x0001f346.de/andreas/imdbs"
)
id, err := imdbs.GetIMDbIDFromQuery("https://www.imdb.com/title/tt3230854/?ref_=nv_sr_srsg_0_tt_8_nm_0_q_expanse") // ("tt3230854", nil)
id, err = imdbs.GetIMDbIDFromQuery("https://www.imdb.com/title/tt0133093") // ("tt0133093", nil)
id, err = imdbs.GetIMDbIDFromQuery("tt2911666") // ("tt2911666", nil)
isValidIMDbID := imdbs.IsValidIMDbID(id) // true
isValidIMDbID = imdbs.IsValidIMDbID("https://www.imdb.com/title/tt0133093") // false
entry, err := imdbs.Scrap(id) // (IMDbEntry{AlternateName: "", IMDbID: "tt2911666", Rating: 7.4, RuntimeInMins: 101, Title: "John Wick", Type: "Movie", Year: 2014}, nil)