An IMDb scraper in GO.
Go to file
2023-10-27 16:05:27 +02:00
go.mod initial commit 2023-10-01 09:00:33 +02:00
go.sum initial commit 2023-10-01 09:00:33 +02:00
imdb-scraper_test.go fixed html escaped characters 2023-10-25 19:00:21 +02:00
imdb-scraper.go make use of git.0x0001f346.de/andreas/useragents 2023-10-27 16:05:27 +02:00
LICENSE initial commit 2023-10-01 09:00:33 +02:00
models.go fixed html escaped characters 2023-10-25 19:00:21 +02:00
README.md initial commit 2023-10-01 09:00:33 +02:00

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)