Lookyloo is a web interface allowing to scrape a website and then displays a tree of domains calling each other. https://lookyloo.circl.lu/
Go to file
Raphaël Vinot 9ef9fef655 chg: Bump configs to be in-line with prod 2019-04-05 14:13:07 +02:00
bin chg: Bump configs to be in-line with prod 2019-04-05 14:13:07 +02:00
cache fix: Systemd service, add proper stop script 2019-04-05 14:01:36 +02:00
client chg: Start the whole thing 2019-01-30 16:01:55 +01:00
doc chg: Add screenshot 2018-01-05 17:10:38 +01:00
etc chg: Bump configs to be in-line with prod 2019-04-05 14:13:07 +02:00
lookyloo fix: Properly remove files if the scraping failed 2019-04-04 00:41:15 +02:00
website fix: Broken call to the error page 2019-04-05 14:05:54 +02:00
.gitignore new: Initial commit for client and async scraping 2019-01-29 18:37:13 +01:00
Dockerfile fix: Monkey patch docker file, it works. 2019-02-05 17:32:19 +01:00
LICENSE Update LICENSE 2018-03-16 11:54:46 +01:00
Pipfile new: Add initial support for user-agent 2019-03-29 20:11:44 +01:00
Pipfile.lock chg: Bump dependencies 2019-04-04 11:21:04 +02:00
README.md chg: Typos in readme 2019-04-05 14:07:08 +02:00
docker-compose.yml fix: Monkey patch docker file, it works. 2019-02-05 17:32:19 +01:00
setup.py fix: Systemd service, add proper stop script 2019-04-05 14:01:36 +02:00

README.md

Lookyloo icon

Lookyloo is a web interface allowing to scrape a website and then displays a tree of domains calling each other.

What is that name?!

1. People who just come to look.
2. People who go out of their way to look at people or something often causing crowds and more disruption.
3. People who enjoy staring at watching other peoples misfortune. Oftentimes car onlookers to car accidents.
Same as Looky Lou; often spelled as Looky-loo (hyphen) or lookylou
In L.A. usually the lookyloo's cause more accidents by not paying full attention to what is ahead of them.

Source: Urban Dictionary

Screenshot

Screenshot of Lookyloo

Implementation details

This code is very heavily inspired by webplugin and adapted to use flask as backend.

The two core dependencies of this project are the following:

  • ETE Toolkit: A Python framework for the analysis and visualization of trees.
  • Splash: Lightweight, scriptable browser as a service with an HTTP API

Installation

IMPORTANT: Use pipenv

NOTE: Yes, it requires python3.6+. No, it will never support anything older.

Installation of Splash

You need a running splash instance, preferably on docker

sudo apt install docker.io
sudo docker pull scrapinghub/splash
sudo docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash --disable-ui --disable-lua --disable-browser-caches
# On a server with a decent abount of RAM, you may want to run it this way:
# sudo docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash --disable-ui -s 100 --disable-lua -m 50000 --disable-browser-caches

Install redis

git clone https://github.com/antirez/redis.git
cd redis
git checkout 5.0
make
cd ..

Installation of Lookyloo

git clone https://github.com/CIRCL/lookyloo.git
cd lookyloo
pipenv install
echo LOOKYLOO_HOME="'`pwd`'" > .env

Run the app

pipenv run start.py

Run the app in production

With a reverse proxy (Nginx)

pip install uwsgi

Config files

You have to configure the two following files:

  • etc/nginx/sites-available/lookyloo
  • etc/systemd/system/lookyloo.service

Copy them to the appropriate directories, and run the following command:

sudo ln -s /etc/nginx/sites-available/lookyloo /etc/nginx/sites-enabled

If needed, remove the default site

sudo rm /etc/nginx/sites-enabled/default

Make sure everything is working:

sudo systemctl start lookyloo
sudo systemctl enable lookyloo
sudo nginx -t
# If it is cool:
sudo service nginx restart

And you can open http://<IP-or-domain>/

Now, you should configure TLS (let's encrypt and so on)

Run the app with Docker

Dockerfile

The repository includes a Dockerfile for building a containerized instance of the app.

Lookyloo stores the scraped data in /lookyloo/scraped. If you want to persist the scraped data between runs it is sufficient to define a volume for this directory.

Running a complete setup with Docker Compose

Additionally you can start a complete setup, including the necessary Docker instance of splashy, by using Docker Compose and the included service definition in docker-compose.yml by running

docker-compose up

After building and startup is complete lookyloo should be available at http://localhost:5000/

If you want to persist the data between different runs uncomment the "volumes" definition in the last two lines of docker-compose.yml and define a data storage directory in your Docker host system there.