Use Python to map a website's external facing links. And then apply D3 to visualize those outbound connections as a network graph.
- Git
- Python (When installing on Windows, make sure you check the "Add python 3.xx to PATH" box.)
- Install the above programs.
- Open a shell window (For Windows open PowerShell, for MacOS open Terminal & for Linux open your distro's terminal emulator).
- Clone this repository using
git
by running the following command;git clone https://github.com/devbret/website-external-links
. - Navigate to the repo's directory by running;
cd website-external-links
. - Install the needed dependencies for running the script by running;
pip install -r requirements.txt
. - Edit the app.py file on line 41, to include the website that you would like to visualize. You can also change the maximum number of URLs that this program will visit at a given domain, by editing the "max_links" value on line 9 in the app.py file; which is set to 100 by default.
- Run the script with the command
python3 app.py
. - To view the website's connections in the index.html file you will need to run a local web server. To do this run
python3 -m http.server
.