hyphe

Websites crawler with built-in exploration and control web interface

https://github.com/medialab/hyphe

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 32 DOI reference(s) in README
  • Academic publication links
    Links to: researchgate.net, academia.edu, sciencedirect.com, springer.com, acm.org, zenodo.org
  • Committers with academic emails
    1 of 31 committers (3.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary

Keywords from Contributors

interactive network-simulation hacking optim projection generic sequences interpretability mesh web-scraping
Last synced: 6 months ago · JSON representation

Repository

Websites crawler with built-in exploration and control web interface

Basic Info
Statistics
  • Stars: 356
  • Watchers: 31
  • Forks: 63
  • Open Issues: 51
  • Releases: 29
Created about 15 years ago · Last pushed 8 months ago
Metadata Files
Readme License Authors Zenodo

README.md

Hyphe: web corpus curation tool & links crawler

DOI SWH SWH

Welcome to Hyphe, a research-driven web crawler developed at the Sciences Po médialab for the DIME-SHS Web project (ANR-10-EQPX-19-01).

Hyphe aims at providing a tool to build web corpus by crawling data from the web and generating networks between what we call "web entities", which can be single pages as well as a website, subdomains or parts of it, or even a combination of those.

Demo & Tutos

You can try a limited version of Hyphe at the following url: http://hyphe.medialab.sciences-po.fr/demo/

You can find extensive tutorials on Hyphe's Wiki. See also these videos on how to grow a Hyphe corpus and what is a web entity.

How to install?

Before running Hyphe, you may want to adjust the settings first. The default config will work but you may want to tune it for your own needs. There is a procedure to change the configuration after the installation. However we recommend to take a look at the Configuration documentation for detailed explanation of each available option.

Warning: Hyphe can be quite disk-consuming, a big corpus with a few hundred crawls with a depth 2 can easily take up to 50GB, so if you plan on allowing multiple users, you should ensure at least a few hundreds gigabytes are available on your machine. You can reduce disk-space by setting to false the option store_crawled_html_content and limiting the max_depth allowed.

Migrating older versions

Hyphe has changed a lot in the past few years. Migrating from an older version by pulling the code from git is not guaranteed anymore, it is highly recommended to reinstall from scratch. Older corpora can be rebuilt by exporting the list of web entities from the old version and recrawl from that list of urls in the new Hyphe.

Easy install: using Docker

For an easy install either on Linux, Mac OS X or Windows, the best solution is to rely on Docker.

Docker enables isolated install and execution of software stacks, which helps installing easily a whole set of dependencies.

Docker's containers are sizeable: you should ensure at least 4GB of empty space is available before installing. In any case, as expressed above, for a regular and complete use of Hyphe, you should better ensure at least 100GB are available.

Note for Mac OS: you need Apple's XCode installed to allow Docker to run on Mac OS. (XCode is not required anymore for Docker, although it's always preferable to have it for other reasons, such as git etc.)

1. Install Docker

First, you should deploy Docker on your machine following its official installation instructions.

Once you've got Docker installed and running, you will need Docker Compose to set up and orchestrate Hyphe services in a single line. Docker Compose is already installed along with Docker on Windows and Mac OS X, but you may need to install it for Linux.

2. Download Hyphe

Collect Hyphe's sourcecode from this git repository (recommended way to benefit from future updates) or download and uncompress a zipped release, then enter the resulting directory:

bash git clone https://github.com/medialab/hyphe.git hyphe cd hyphe

Or, if you do not have git (for instance on a Mac without XCode), you can also download and uncompress the files from Hyphe's latest release by clicking the link to "Source code (zip)" or "Source code (tar.gz)" from the following page: https://github.com/medialab/hyphe/releases

3. Configure

Then, copy the default configuration files and edit them to adjust the settings to your needs: WARNING: do not enclose the values with any kind of quotes

```bash

use "copy" instead of "cp" under Windows powershell

cp .env.example .env cp config-backend.env.example config-backend.env cp config-frontend.env.example config-frontend.env ```

The .env file lets you configure: + TAG: the reference Docker image you want to work with among + prod: for the latest stable release + preprod: for intermediate unstable developments + A specific version, for instance 1.3.0. You will find the list on Hyphe's Docker Hub page and descriptions for each version on GitHub's releases page. + PUBLIC_PORT: the web port on which Hyphe will be served (usually 80 for a single service server, or for a shared host any other port you like which will need to be redirected) + DATA_PATH: using Hyphe can quickly consume several gigabytes of hard drive. By default, volumes will be stored within Docker's default directories but you can define your own path here.

WARNING: DATA_PATH MUST be either empty, or a full absolute path including leading and trailing slashes (for instance /var/opt/hyphe/).

It is not currently supported under Windows, and should always remain empty in this case (so you should install Hyphe from a drive with enough available space). + RESTART_POLICY: the choice of autorestart policy you want Hyphe containers to apply + no: (default) containers will not be restarted automatically under any circumstance + always: containers will always restart when stopped + on-failure: containers will restart only if the exit code indicates an on-failure error + unless-stopped: containers will always restart unless when explicitly stopped

If you want Hyphe to start automatically at boot, you should use the always policy and make sure the Docker daemon is started at boot time with your service manager.

Hyphe's internal settings are adjustable within config-backend.env and config-frontend.env. Adjust the settings values to your needs following recommendations from the config documentation.

If you want to restrict Hyphe's access to a selected few, you should leave HYPHE_OPEN_CORS_API false in config-backend.env, and setup HYPHE_HTPASSWORD_USER & HYPHE_HTPASSWORD_PASS in config-frontend.env (use openssl passwd -apr1 to generate your password's encrypted value).

4. Prepare the Docker containers

You have two options: either collect, or build Hyphe's Docker containers.

  • Recommended: Pull our official preassembled images from the Docker Store

bash docker-compose pull # or with newer Docker versions docker compose pull

  • Alternative: Build your own images from the source code (mostly for development or if you intend to edit the code, and for some very specific configuration settings):

bash docker-compose build # or with newer Docker versions docker compose build

Pulling should be faster, but it will still take a few minutes to download or build everything either way.

5. Start Hyphe

Finally, start Hyphe containers with the following command, which will run Hyphe and display all of its logs in the console until stopped by pressing Ctrl+C.

```bash docker-compose up

or with newer Docker versions

docker compose up ```

Or run the containers as a background daemon (for instance for production on a server):

```bash docker-compose up -d

or with newer Docker versions

docker compose up -d ```

Once the logs say "All tests passed. Ready!", you can access your Hyphe install at http://localhost:80/ (or http://localhost:<PUBLIC_PORT>/ if you changed the port value in the .env configuration file).

6. Stop and monitor Hyphe

To stop containers running in background, use

```bash docker-compose stop

or with newer Docker versions

docker compose stop ```

To also clean relying data, use

```bash docker-compose down

or with newer Docker versions

docker compose down ```

You can inspect the logs of the various Docker containers using

```bash docker-compose logs

or with newer Docker versions

docker compose logs ```

or with option -f to track latest entries like with tail.

Whenever you change any configuration file, restart the Docker container to take the changes into account:

```bash docker-compose stop docker-compose up -d

or with newer Docker versions

docker compose stop docker compose up -d ```

To get more explanations on any extra advanced use of Docker, run

```bash docker-compose help

or with newer Docker versions

docker compose help ```

If you encounter issues with the Docker builds, please report an issue including the "Image ID" of the Docker images you used from the output of docker images or, if you installed from source, the last commit ID (read from git log).

7. Update to future versions

WARNING: Do not do this if you're not sure of what you're doing, upgrading to major new versions can potentially break your existing corpuses making it really complex to get your data back.

If you installed from git by pulling our builds from DockerHub, you should be able to update Hyphe to future minor releases by simply doing the following:

```bash docker-compose down git pull docker-compose pull

eventually edit your configuration files to use new options

docker-compose up -d

or with newer Docker versions

docker compose down git pull docker compose pull

eventually edit your configuration files to use new options

docker compose up -d ```

Manual install (complex and only for Linux)

If your computer or server relies on an old Linux distribution unable to run Docker, if you want to contribute to Hyphe's backend development, or for any other personal reason, you might want to rather install Hyphe manually by following the manual install instructions.

Please note there are many dependencies which are not always trivial to install and that you might run in quite a bit of issues. You can ask for some help by opening an issue and describing your problem, hopefully someone will find some time to try and help you.

Hyphe relies on a web interface with a server daemon which must be running at all times. When manually installed, one must start, stop or restart the daemon using the following command (without sudo):

bash bin/hyphe <start|restart|stop> [--nologs]

By default the starter will display Hyphe's log in the console using tail. You can use Ctrl+C whenever you like to stop displaying logs without shutting Hyphe down. Use the --nologs option to disable logs display on start. Logs are always accessible from the log directory.

All settings can be configured directly from the global configuration file config/config.json. Restart Hyphe afterwards to take changes into account: bin/hyphe restart.

Serve Hyphe on the web

As soon as the Docker containers or the manual daemon start, you can use Hyphe's web interface on your local machine at the following url: - Docker install: http://localhost/ - manual install: http://localhost/hyphe.

For personal uses, you can already work with Hyphe as such. Although, if you want to let others use it as well (typically if you installed on a distant server), you need to serve it on a webserver and make a few adjustments.

Read the dedicated documentation to do so.

Advanced developers features & contributing

Please read the dedicated Developers documentation and the API description.

What's next?

See our roadmap!

Papers & references

Tutorials / examples

You can also find here the slides corresponding to these videos.

Publications about Hyphe

  • OOGHE-TABANOU, Benjamin, JACOMY, Mathieu, GIRARD, Paul & PLIQUE, Guillaume, "Hyperlink is not dead!" (Proceeding / Slides), In Proceedings of the 2nd International Conference on Web Studies (WS.2 2018), Everardo Reyes, Mark Bernstein, Giancarlo Ruffo, and Imad Saleh (Eds.). ACM, New York, NY, USA, 12-18. DOI: https://doi.org/10.1145/3240431.3240434

  • PLIQUE, Guillaume, JACOMY, Mathieu, OOGHE-TABANOU, Benjamin & GIRARD, Paul, "It's a Tree... It's a Graph... It's a Traph!!!! Designing an on-file multi-level graph index for the Hyphe web crawler". (Video / Slides) Presentation at the FOSDEM, Brussels, BELGIUM, February 3rd, 2018.

  • JACOMY, Mathieu, GIRARD, Paul, OOGHE-TABANOU, Benjamin, et al, "Hyphe, a curation-oriented approach to web crawling for the social sciences.", in International AAAI Conference on Web and Social Media. Association for the Advancement of Artificial Intelligence, 2016.

Publications using Hyphe

Credits & License

Mathieu Jacomy, Benjamin Ooghe-Tabanou & Guillaume Plique @ Sciences Po médialab

Discover more of our projects at médialab tools.

This work is supported by DIME-Web, part of DIME-SHS research equipment financed by the EQUIPEX program (ANR-10-EQPX-19-01).

Hyphe is a free open source software released under AGPL 3.0 license.

Thanks to https://www.useragents.me for maintaining a great updated list of common user agents which are reused within Hyphe!

[...] I hear _kainos_ [(greek: "now")] in the sense of thick, ongoing presence, with __hyphae__ infusing all sorts of temporalities and materialities." Donna J. Haraway, Staying with the Trouble, Making kin with the Chthlucene p.2

Owner

  • Name: médialab Sciences Po
  • Login: medialab
  • Kind: organization
  • Location: Paris, France

SciencesPo's médialab is an interdisciplinary research laboratory gathering engineers, designers & social science researchers.

GitHub Events

Total
  • Create event: 4
  • Release event: 2
  • Issues event: 22
  • Watch event: 22
  • Delete event: 1
  • Issue comment event: 17
  • Push event: 53
  • Fork event: 1
Last Year
  • Create event: 4
  • Release event: 2
  • Issues event: 22
  • Watch event: 22
  • Delete event: 1
  • Issue comment event: 17
  • Push event: 53
  • Fork event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 3,312
  • Total Committers: 31
  • Avg Commits per committer: 106.839
  • Development Distribution Score (DDS): 0.42
Past Year
  • Commits: 25
  • Committers: 3
  • Avg Commits per committer: 8.333
  • Development Distribution Score (DDS): 0.08
Top Committers
Name Email Commits
Benjamin Ooghe-Tabanou b****e@s****r 1,922
Mathieu Jacomy M****y@g****m 1,075
Martin Delabre d****n@g****m 60
heikki doeleman t****o@g****m 50
Yomguithereal g****e@g****m 39
jeremy richard j****d@s****r 29
RouxRC b****e@g****m 22
Pablo Hoffman p****o@p****m 17
Paul Girard p****d@s****r 15
Benjamin Ooghe b****e@s****r 13
Paul Girard p****d@s****r 12
Jules j****s@g****m 11
jrault j****t@s****r 10
Patrick Browne p****e@g****m 8
Kury25 m****n@t****t 4
dependabot[bot] 4****] 3
diegantobass d****o@s****r 3
Anne Lhote -****l 3
oncletom hi@o****o 3
Thomas Parisot t****t@b****k 2
pipojojo j****1@s****r 1
Paul Girard p****i@w****r 1
boo b****o@l****b 1
pom p****m@l****b 1
mydu d****9@g****m 1
julienp 1****e 1
cvuiller c****z@g****m 1
Stijn Peeters s****s@u****l 1
Glenn Lewis g****s@g****m 1
Björn Ekström 1****m 1
and 1 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 119
  • Total pull requests: 2
  • Average time to close issues: 10 months
  • Average time to close pull requests: 8 minutes
  • Total issue authors: 18
  • Total pull request authors: 1
  • Average comments per issue: 1.34
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 7
  • Pull requests: 0
  • Average time to close issues: about 2 months
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 0
  • Average comments per issue: 0.43
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • boogheta (68)
  • jacomyma (14)
  • bornakke (10)
  • paulgirard (6)
  • tommv (3)
  • Yomguithereal (3)
  • nielsmayrargue (2)
  • jacomyal (2)
  • SeyedAlirezaMalih (2)
  • RouxRC (2)
  • jayparikh1998 (1)
  • mzuer (1)
  • dale-wahl (1)
  • debcarpe (1)
  • ghost (1)
Pull Request Authors
  • RouxRC (2)
  • bjornekstrom (1)
Top Labels
Issue Labels
web interface (40) fine tuning (29) core (28) design (24) feature (18) crawler (13) memory structure (11) urgent (8) discussion (7) remark (6) big change (3) documentation (3) bug (2) install (1)
Pull Request Labels

Dependencies

hyphe_frontend/package-lock.json npm
  • 508 dependencies
hyphe_frontend/package.json npm
  • css-loader ^0.28.7 development
  • style-loader ^0.19.0 development
  • webpack ^3.6.0 development
  • ajv 6.9.1
  • angular 1.6.6
  • angular-animate 1.6.6
  • angular-aria 1.6.6
  • angular-bowser 0.0.4
  • angular-loader 1.6.6
  • angular-material 1.1.5
  • angular-md5 0.1.10
  • angular-messages 1.6.6
  • angular-mocks 1.6.6
  • angular-route 1.6.6
  • angular-sanitize 1.6.6
  • angulartics 1.4.0
  • d3 4.11.0
  • file-saver 1.3.3
  • graphology 0.23.2
  • graphology-components 1.5.2
  • graphology-gexf 0.10.1
  • graphology-layout 0.5.0
  • graphology-layout-forceatlas2 0.8.2
  • graphology-metrics 2.1.0
  • graphology-types 0.23.0
  • ng-tags-input 3.2.0
  • sigma 2.2.0
bin/textExtractor/requirements.txt pypi
  • jsonrpclib *
  • pymongo *
hyphe_backend/crawler/requirements-scrapyd.txt pypi
  • Scrapy ==1.8.0
  • Twisted ==20.3.0
  • pymongo ==3.8
  • queuelib ==1.4.2
  • scrapyd ==1.2.1
  • scrapyd-client ==1.2.0a1
  • selenium ==2.42.1
  • service_identity ==18.1.0
  • tld ==0.12.1
  • txmongo ==19.2.0
  • ural ==0.32.0
  • urllib3 *
requirements.txt pypi
  • Scrapy ==1.6.0
  • Twisted >=18,<=19
  • click *
  • fake-useragent ==0.1.11
  • hyphe-traph >=1.4.0
  • jsonrpclib *
  • msgpack-python >=0.3
  • progressbar2 *
  • pymongo ==3.8
  • pystache ==0.5.4
  • scrapyd-client ==1.2.0a1
  • selenium ==2.42.1
  • service_identity *
  • tld ==0.12.1
  • txJSON-RPC ==0.5
  • txmongo >=18,<=19
  • ural ==0.32.0
  • urllib3 *
  • virtualenvwrapper *
Dockerfile docker
  • python 2.7-slim build
docker-compose.yml docker
  • mongo 3.6
  • scpomedialab/hyphe_backend ${TAG}
  • scpomedialab/hyphe_crawler ${TAG}
  • scpomedialab/hyphe_frontend ${TAG}
hyphe_backend/crawler/Dockerfile docker
  • python 2.7-slim build
hyphe_frontend/Dockerfile docker
  • nginx alpine build
  • node lts-alpine build