- To create virenv:
virtualenv venv source venv/bin/activate
- Then install requirement:
pip3 install -r requirements.txt
- Run scraper to generate JSON
python3 main.py scrap
- Use cached JSON to generate graph and query graph
python3 main.py cache
- Use provided JSON to generate graph and query graph
python3 main.py input
- Based on the prompt message, enter valid input
- For example:
- Find how much a "The Boy Next Door (film)" has grossed:
=> 1 The Boy Next Door (film)
- List which movies an "Morgan Freeman" has worked in:
=> 2 Morgan Freeman
- List which actors worked in movie "Dreamcatcher (2003 film)":
=> 3 Dreamcatcher (2003 film)
- List the top 50 actors with the most total grossing value
=> 4 50
- List the oldest 20 actors
=> 5 20
- List all the movies in year 2018:
=> 6 2018
- List all the actors in year 2016:
=> 7 2016
- Show list of movies:
=> 8
- Show list of actors:
=> 9
- Total number of movies:
=> 10
- Total Number of actors:
=> 11
- Show given movie info:
=> 12 The Verdict
- Show given actor info:
=> 13 Bruce Willis
- Identify 'hub' actors:
=> 14
- Calculate age and grossing value correlation and generate plot -> correlation.png:
=> 15
- Find how much a "The Boy Next Door (film)" has grossed:
- Modify parameters in config.py
CLOSESPIDER_ITEMCOUNT = 30
wiki_start = "https://en.wikipedia.org/wiki/Morgan_Freeman"
PORT = 5001
python3 graphy_test.py
python3 app.py
python3 test_app.py
- To run the API test_app.py, first start running the serve:
python3 app.py