![]() |
VOOZH | about |
dotnet add package ImdbLib --version 0.0.2
NuGet\Install-Package ImdbLib -Version 0.0.2
<PackageReference Include="ImdbLib" Version="0.0.2" />
<PackageVersion Include="ImdbLib" Version="0.0.2" />Directory.Packages.props
<PackageReference Include="ImdbLib" />Project file
paket add ImdbLib --version 0.0.2
#r "nuget: ImdbLib, 0.0.2"
#:package ImdbLib@0.0.2
#addin nuget:?package=ImdbLib&version=0.0.2Install as a Cake Addin
#tool nuget:?package=ImdbLib&version=0.0.2Install as a Cake Tool
Library and LINQPad scripts to gather, store and update data about movies in IMDB
using var imdb = new ImdbScraper(opt =>
{
// Setup options
opt.DataFolder = @"C:\IMDBData";
// Set this to true for debugging
// this will make the scraper work off a much smaller dataset
opt.DbgUseSmallDatasets = true;
});
await imdb.Init();
imdb.Start();
imdb.Stop();
Run scrape.linq in LINQPad to run the scraping
datasets\title.basics.tsv
This dataset is provided by IMDB and represents basic info about all the titles.
If it's not present or if our copy is older than opt.DatasetRefreshPeriod (default 60 days) we download it.
datasets-dev\title.basics.tsv
If you set opt.DbgUseSmallDatasets, it will extract a much smaller dataset (1000 titles) to use in the rest of the data flow.
datasets\titles.json
(or datasets-dev\titles.json if opt.DbgUseSmallDatasets is set)
opt.TitleFilter to restrict the movies we should considerThis file is regenerated if either:
opt.RefreshTitleFilterThe default filter is:
opt.TitleFilter = e =>
!e.IsAdult &&
e.Type == "movie" &&
e.StartYear is >= 1970;
Note: the filter needs to discard the titles with a null StartYear for the rest of the data flow to work correctly.
These titles represent the list of all the movies we want to scrape
Now we have the list of titles we're interested in, we will scrape the info for them.
Start() kicks off the process and is controlled by these options:
opt.ScrapeBatchSize the number of movies to scrape before saving (default 64)opt.ScrapeParallelism determines how many movies we scrape in parallel (default 4)There is a file to keep track of the state of each movie:
scraping\title-states.json
And the movies are grouped by year in files named like this:
scraping\1988.json
Note: if using opt.DbgUseSmallDatasets the files will be in the scraping-dev\ folder.
If we detect that IMDB rate limits us, we will pause for 10min.
scrape.linqRun the scraper
scrape-dbg.linqUsed to debug / tweak the scraping. It has an exact copy of the HtmlScraper class. The different functions are well documented in the script.
finder.linqUsed to query the films and nicely display the results.
Use this to find good movies!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.2 | 448 | 11/15/2022 |