Skip to main content

Spidy is the simple, easy to use command line web crawler.

Project description

spidy Web Crawler

Spidy (/spˈɪdi/) is the simple, easy to use command line web crawler.
Given a list of web links, it uses Python
```requests`` <>`__ to query the
webpages, and ```lxml`` <>`__ to extract all
links from the page. Pretty simple!

|spidy Logo|

|Version: 1.6.2| |Release: 1.4.0| |License: GPL v3| |Python 3.3+| |All
Platforms!| |Open Source Love| |Lines of Code: 1553| |Lines of Docs:
605| |Last Commit| |Travis CI Status| |PyPI Wheel| |PyPI Status|
|Contributors| |Forks| |Stars|

Created by `rivermont <>`__ (/rɪvɜːrmɒnt/)
and `FalconWarriorr <>`__ (/fælcʌnraɪjɔːr/),
and developed with help from `these awesome
people <>`__. Looking for
technical documentation? Check out
````` <>`__\
Looking to contribute to this project? Have a look at
````` <>`__,
then check out the docs.


🎉 New Features!


Crawl all the things! Run separate threads to work on multiple pages at
the same time. Such fast. Very wow.


Install spidy with one line: ``pip install spidy-web-crawler``!

Automatic Testing with Travis CI

Release v1.4.0 - #\ `31663d3 <>`__

`spidy Web Crawler Release
1.4 <>`__


- `spidy Web
Crawler <>`__
- `New Features! <>`__
- `Contents <>`__
- `How it Works <>`__
- `Why It's
Different <>`__
- `Features <>`__
- `Tutorial <>`__

- `Using with
Docker <>`__
- `Installing from
PyPI <>`__
- `Installing from Source
Code <>`__
- `Python
Installation <>`__

- `Windows and
Mac <>`__
- `Anaconda <>`__
- `Python
Base <>`__
- `Linux <>`__

- `Crawler
Installation <>`__
- `Launching <>`__
- `Running <>`__

- `Config <>`__
- `Start <>`__
- `Autosave <>`__
- `Force Quit <>`__

- `How Can I Support
This? <>`__
- `Contributors <>`__
- `License <>`__

How it Works

Spidy has two working lists, ``TODO`` and ``DONE``. 'TODO' is the list
of URLs it hasn't yet visited. 'DONE' is the list of URLs it has already
been to. The crawler visits each page in TODO, scrapes the DOM of the
page for links, and adds those back into TODO. It can also save each
page, because datahoarding 😜.

Why It's Different

What sets spidy apart from other web crawling solutions written in

Most of the other options out there are not web crawlers themselves,
simply frameworks and libraries through which one can create and deploy
a web spider for example Scrapy and BeautifulSoup. Scrapy is a Web
crawling framework, written in Python, specifically created for
downloading, cleaning and saving data from the web whereas BeautifulSoup
is a parsing library that allows a programmer to get specific elements
out of a webpage but BeautifulSoup alone is not enough because you have
to actually get the webpage in the first place.

But with Spidy, everything runs right out of the box. Spidy is a Web
Crawler which is easy to use and is run from the command line. You have
to give it a URL link of the webpage and it starts crawling away! A very
simple and effective way of fetching stuff off of the web.


We built a lot of the functionality in spidy by watching the console
scroll by and going, "Hey, we should add that!" Here are some features
we figure are worth noting.

- Error Handling: We have tried to recognize all of the errors spidy
runs into and create custom error messages and logging for each.
There is a set cap so that after accumulating too many errors the
crawler will stop itself.
- Cross-Platform compatibility: spidy will work on all three major
operating systems, Windows, Mac OS/X, and Linux!
- Frequent Timestamp Logging: Spidy logs almost every action it takes
to both the console and one of two log files.
- Browser Spoofing: Make requests using User Agents from 4 popular web
browsers, use a custom spidy bot one, or create your own!
- Portability: Move spidy's folder and its contents somewhere else and
it will run right where it left off. *Note*: This only works if you
run it from source code.
- User-Friendly Logs: Both the console and log file messages are simple
and easy to interpret, but packed with information.
- Webpage saving: Spidy downloads each page that it runs into,
regardless of file type. The crawler uses the HTTP ``Content-Type``
header returned with most files to determine the file type.
- File Zipping: When autosaving, spidy can archive the contents of the
``saved/`` directory to a ``.zip`` file, and then clear ``saved/``.


Using with Docker

Spidy can be easily run in a Docker container.

- First, build the ```Dockerfile`` <dockerfile>`__:
``docker build -t spidy .``
- Verify that the Docker image has been created: ``docker images``
- Then, run it: ``docker run --rm -it -v $PWD:/data spidy``
- ``--rm`` tells Docker to clean up after itself by removing stopped
- ``-it`` tells Docker to run the container interactively and allocate
a pseudo-TTY.
- ``-v $PWD:/data`` tells Docker to mount the current working directory
as ``/data`` directory inside the container. This is needed if you
want Spidy's files (e.g. ``crawler_done.txt``, ``crawler_words.txt``,
``crawler_todo.txt``) written back to your host filesystem.

Spidy Docker Demo

.. figure:: media/spidy_docker_demo.gif
:alt: Spidy Docker Demo

Spidy Docker Demo

Installing from PyPI

Spidy can be found on the Python Package Index as ``spidy-web-crawler``.
You can install it from your package manager of choice and simple run
the ``spidy`` command. The working files will be found in your home

Installing from Source Code

Alternatively, you can download the source code and run it.

Python Installation

The way that you will run spidy depends on the way you have Python

Windows and Mac

There are many different versions of
`Python <>`__, and hundreds of different
installations for each them. Spidy is developed for Python v3.5.2, but
should run without errors in other versions of Python 3.


We recommend the `Anaconda
distribution <>`__. It comes
pre-packaged with lots of goodies, including ``lxml``, which is required
for spidy to run and not including in the standard Python package.

Python Base

You can also just install `default
Python <>`__, and install the external
libraries separately. This can be done with ``pip``:


pip install -r requirements.txt


Python 3 should come preinstalled with most flavors of Linux, but if
not, simply run


sudo apt update
sudo apt install python3 python3-lxml python3-requests

Then ``cd`` into the crawler's directory and run ``python3``.

Crawler Installation

If you have git or GitHub Desktop installed, you can clone the
repository `from here <>`__. If
not, download `the latest source
code <>`__ or grab
the `latest release <>`__.


Use ``cd`` to navigate to the directory that spidy is located in, then



.. figure::


Spidy logs a lot of information to the command line throughout its life.
Once started, a bunch of ``[INIT]`` lines will print. These announce
where spidy is in its initialization process.


On running, spidy asks for input regarding certain parameters it will
run off of. However, you can also use one of the configuration files, or
even create your own.

To use spidy with a configuration file, input the name of the file when
the crawler asks

The config files included with spidy are:

- *``blank.txt``*: Template for creating your own configurations.
- ``default.cfg``: The default version.
- ``heavy.cfg``: Run spidy with all of its features enabled.
- ``infinite.cfg``: The default config, but it never stops itself.
- ``light.cfg``: Disable most features; only crawls pages for links.
- ``rivermont.cfg``: My personal favorite settings.
- ``rivermont-infinite.cfg``: My favorite, never-ending configuration.


Sample start log.

.. figure::


Sample log after hitting the autosave cap.

.. figure::

Force Quit

Sample log after performing a ``^C`` (CONTROL + C) to force quit the

.. figure::

How Can I Support This?

The easiest thing you can do is Star spidy if you think it's cool, or
Watch it if you would like to get updates. If you have a suggestion,
`create an Issue <>`__ or
Fork the ``master`` branch and open a Pull Request.


See the
````` <>`__

- The logo was designed by `Cutwell <>`__

- `3onyc <>`__ - PEP8 Compliance.
- `DeKaN <>`__ - Getting PyPI packaging to
- `esouthren <>`__ - Unit testing.
- `Hrily <>`__ - Multithreading.
- `j-setiawan <>`__ - Paths that work on
all OS's.
- `michellemorales <>`__ - Confirmed
OS/X support.
- `petermbenjamin <>`__ - Docker
- `quatroka <>`__ - Fixed testing bugs.
- `stevelle <>`__ - Respect robots.txt.
- `thatguywiththatname <>`__ -
README link corrections.


We used the `Gnu General Public
License <>`__ (see
```LICENSE`` <>`__)
as it was the license that best suited our needs. Honestly, if you link
to this repo and credit ``rivermont`` and ``FalconWarriorr``, and you
aren't selling spidy in any way, then we would love for you to
distribute it. Thanks!


.. |spidy Logo| image::
.. |Version: 1.6.2| image::
.. |Release: 1.4.0| image::
.. |License: GPL v3| image::
.. |Python 3.3+| image::
.. |All Platforms!| image::,%20OS/X,%20Linux-%20%20-brightgreen.svg
.. |Open Source Love| image::
.. |Lines of Code: 1553| image::
.. |Lines of Docs: 605| image::
.. |Last Commit| image::
.. |Travis CI Status| image::
.. |PyPI Wheel| image::
.. |PyPI Status| image::
.. |Contributors| image::
.. |Forks| image::
.. |Stars| image::

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spidy-web-crawler-1.6.5.tar.gz (32.0 kB view hashes)

Uploaded Source

Built Distribution

spidy_web_crawler-1.6.5-py3-none-any.whl (38.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page