Scrape and Analyze IMDB Movie Reviews
Fetch IMDB movie or TV-series reviews into LlamaIndex documents, Windows-tested only.
Why it matters
Automate the extraction and analysis of user reviews from IMDB for any movie or TV series. This asset allows for deep dives into audience sentiment and specific feedback, streamlining research for content creators and analysts.
Outcomes
What it gets done
Fetch reviews from IMDB using movie title and year.
Extract review metadata including date, rating, and helpfulness.
Optionally generate CSV files for further analysis.
Integrate with LlamaIndex and Langchain for advanced querying and agentic use.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-reader-readers-imdb-review | bash Overview
Readers Imdb Review
A Windows-only LlamaIndex reader that fetches IMDB movie or TV-series reviews with detailed metadata via a chosen webdriver engine. Use on Windows for real IMDB review content grounded in actual reviewer text; Linux support is still being debugged.
What it does
The IMDB Movie Reviews Loader fetches all reviews of a movie or TV series from IMDB's official site into LlamaIndex documents. The source explicitly states it currently works on Windows and requires further debugging on Linux, with fixes noted as in progress - a real, current platform limitation rather than a documentation gap.
IMDBReviews is configured with four attributes: movie_name_year (the title plus year, used to identify the correct IMDB entry), webdriver_engine (edge, google, or gecko/Mozilla), generate_csv (whether to also write a CSV file of results), and multithreading (whether to fetch reviews using multiple threads). load_data() then performs the fetch. Each review's metadata includes its date, title, rating, link, whether it's marked as a spoiler, how many people found it helpful, and the total vote count. Results are also downloaded into a local movie_reviews folder, named after the movie.
When to use - and when NOT to
Use it when you need real user review text and metadata for a specific movie or TV series loaded into LlamaIndex - for example building a query engine that answers questions grounded in what reviewers actually said. Run it on Windows given the source's own stated platform limitation; expect issues on Linux until the noted fixes land. Do not rely on generate_csv/multithreading defaults without checking - the source's own LlamaIndex and LangChain examples both explicitly set them (generate_csv=False, multithreading=False) rather than leaving them implicit.
Capabilities
load_data fetches all reviews for a named movie/TV-series-plus-year via a chosen webdriver engine, returning documents with date/title/rating/link/spoiler-flag/helpful-count/vote-total metadata, and can optionally also write results to a local CSV.
How to install
pip install llama-index-readers-imdb-review
Also requires installing the project's own dependencies via pip install -r requirements.txt. Currently Windows-only; Linux support needs further debugging per the source.
Who it's for
Developers on Windows who need real IMDB review text and metadata for a specific movie or TV series loaded into LlamaIndex or LangChain for question-answering grounded in actual reviewer content.
Source README
IMDB MOVIE REVIEWS LOADER
pip install llama-index-readers-imdb-review
This loader fetches all the reviews of a movie or a TV-series from IMDB official site. This loader is working on Windows machine and it requires further debug on Linux. Fixes are on the way
Install the required dependencies
pip install -r requirements.txt
The IMDB downloader takes in two attributes
- movie_name_year: The name of the movie or series and year
- webdriver_engine: To use edge, google or gecko (mozilla) webdriver
- generate_csv: Whether to generate csv file
- multithreading: whether to use multithreading or not
Usage
from llama_index.readers.imdb_review import IMDBReviews
loader = IMDBReviews(
movie_name_year="The Social Network 2010", webdriver_engine="edge"
)
docs = loader.load_data()
The metadata has the following information
- date of the review (date)
- title of the review (title)
- rating of the review (rating)
- link of the review (link)
- whether the review is spoiler or not (spoiler)
- number of people found the review helpful (found_helpful)
- total number of votes (total)
It will download the files inside the folder movie_reviews with the filename as the movie name
EXAMPLES
This loader can be used with both Langchain and LlamaIndex.
LlamaIndex
from llama_index.core import VectorStoreIndex, download_loader
from llama_index.core import VectorStoreIndex
from llama_index.readers.imdb_review import IMDBReviews
loader = IMDBReviewsloader(
movie_name_year="The Social Network 2010",
webdriver_engine="edge",
generate_csv=False,
multithreading=False,
)
docs = loader.load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query(
"What did the movie say about Mark Zuckerberg?",
)
print(response)
Langchain
from langchain.llms import OpenAI
from langchain.agents.agent_toolkits.pandas import (
create_pandas_dataframe_agent,
)
from langchain.agents import Tool
from langchain.agents import initialize_agent
from langchain.chat_models import ChatOpenAI
from llama_index.readers.imdb_review import IMDBReviews
loader = IMDBReviewsloader(
movie_name_year="The Social Network 2010",
webdriver_engine="edge",
generate_csv=False,
multithreading=False,
)
docs = loader.load_data()
tools = [
Tool(
name="LlamaIndex",
func=lambda q: str(index.as_query_engine().query(q)),
description="useful for when you want to answer questions about the movies and their reviews. The input to this tool should be a complete english sentence.",
return_direct=True,
),
]
llm = ChatOpenAI(temperature=0)
agent = initialize_agent(tools, llm, agent="conversational-react-description")
agent.run("What did the movie say about Mark Zuckerberg?")
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.