Search for movies and TV Shows
POST /api/title
- Add a new
Title
to the database - Creates an appropriate
Title
node and associatedPerson
nodes (for the directors, stars, etc.)
- Add a new
Prerequisites:
- Install the dependencies with
pipenv install --dev
- Start the
neo4j
Docker Containerdocker run --name neo4j-container -v $PWD/neo4j/data:/data -v $PWD/neo4j/logs:/logs --env NEO4J_AUTH="neo4j/pass" -p 7474:7474 -p 7687:7687 --rm neo4j:3.5.3
- Start the application
pipenv run python -m title_explorer
In order to create new Title
entries in the database:
- Create a
Title
object according to thetitle-object
definition found inschema.json
- POST to the
/api/title
endpoint. - If the json-body conforms to the json-schema, then the title will automatically be added to the
neo4j
database- In case of a data-validation failure, a 400 error is returned, with a description of what went wrong
An example graph can be generated by running the neo4j
instance along with the title_explorer
server, and running the python file in resources/python/example_graph
This will create a graph of the top Movies and TV Shows, based on user reviews.
A nice visualization can then be found at localhost:7474
.
Use neo4j
as the username and pass
as the password, and run the cypher query:
MATCH (n1)-[r]->(n2) RETURN r, n1, n2
The relationships are from Person
to Title
:
Paul Rudd
stars_inAnt-Man
Joe Russo
directedAvengers: Infinity War
There is an ommited python module scraper_routes
, that holds routes that when called, result in title-explorer
scraping/collecting Title
information, and storing the results in the neo4j
instance.
- Get acquainted with
asyncio
in Python - Become familiar with webscraping using
BeautifulSoup
- Store data in a graph database