diff options
| author | dev | 2026-06-24 03:46:14 +0200 |
|---|---|---|
| committer | dev | 2026-06-24 03:46:14 +0200 |
| commit | 86069f011f35e339a30ffb717308990369c5f29f (patch) | |
| tree | 276537b5c86400d409a8d257ec68b13512b997db /src/main.go | |
| parent | eec189de8a5be0a18103a215d369c6135b86e9ff (diff) | |
| download | hnimdbbot-86069f011f35e339a30ffb717308990369c5f29f.tar.gz | |
feat: fetchAndUpdateImdbData — download IMDB datasets and populate imdb table
- Check for imdb entries with NULL average_rating
- Download title.basics.tsv.gz and title.ratings.tsv.gz to imdbdata/
- Decompress alongside gzip originals
- Parse only rows matching our imdb_ids (memory-efficient)
- Update: average_rating, num_votes, title_type, primary_title,
original_title, start_year, runtime_minutes
- Results: 3394 ratings, 3093 basics updated out of 3448 entries
Diffstat (limited to 'src/main.go')
| -rw-r--r-- | src/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.go b/src/main.go index 0aa01bb..123cc64 100644 --- a/src/main.go +++ b/src/main.go @@ -190,4 +190,8 @@ func main() { if err = app.populateImdbTable(); err != nil { log.Fatalf("populateImdbTable: %v", err) } + + if err = app.fetchAndUpdateImdbData(); err != nil { + log.Fatalf("fetchAndUpdateImdbData: %v", err) + } } |
