https://github.com/commoncrawl/news-crawl

News crawling with StormCrawler - stores content as WARC

https://github.com/commoncrawl/news-crawl

Science Score: 26.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
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary

Keywords

apache-storm common-crawl commoncrawl crawler news storm-crawler warc web-crawler
Last synced: 5 months ago · JSON representation

Repository

News crawling with StormCrawler - stores content as WARC

Basic Info
  • Host: GitHub
  • Owner: commoncrawl
  • License: apache-2.0
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 247 KB
Statistics
  • Stars: 346
  • Watchers: 33
  • Forks: 37
  • Open Issues: 16
  • Releases: 0
Topics
apache-storm common-crawl commoncrawl crawler news storm-crawler warc web-crawler
Created over 9 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

NEWS-CRAWL

Crawler for news based on StormCrawler. Produces WARC files to be stored as part of the Common Crawl. The data is hosted as AWS Open Data Set – if you want to use the data and not the crawler software please read the announcement of the news dataset.

Prerequisites

  • Java 8
  • Install Elasticsearch 7.5.0 (ev. also Kibana)
  • Install Apache Storm 1.2.4
  • Start Elasticsearch and Storm
  • Build ES indices by running bin/ES_IndexInit.sh

Crawler Seeds

The crawler relies on RSS/Atom feeds and news sitemaps to find links to news articles on news sites. A small collection of example seeds (feeds and sitemaps) is provided in ./seeds/. Adding support for news sites which do not provide a news feed or sitemap is an open issue, see #41.

Configuration

The default configuration should work out-of-the-box. The only thing to do is to configure the user agent properties send in the HTTP request header. Open the file conf/crawler-conf.yaml in an editor and fill in the values for http.agent.name and all further properties starting with the http.agent. prefix.

Run the crawl

Generate an uberjar: sh mvn clean package

And run ... sh storm jar target/crawler-1.18.1.jar org.commoncrawl.stormcrawler.news.CrawlTopology -conf $PWD/conf/es-conf.yaml -conf $PWD/conf/crawler-conf.yaml $PWD/seeds/ feeds.txt

This will launch the crawl topology. It will also "inject" all URLs found in the file ./seeds/feeds.txt in the status index. The URLs point to news feeds and sitemaps from which links to news articles are extracted and fetched. The topology will create WARC files in the directory specified in the configuration under the key warc.dir. This directory must be created beforehand.

Of course, it's also possible to add (or remove) the seeds (feeds and sitemaps) using the Elasticsearch API. In this case, the can topology can be run without the last two arguments.

Alternatively, the topology can be run from the crawler.flux, please see the Storm Flux documentation. Make sure to adapt the Flux definition to your needs!

Monitor the crawl

When the topology is running you can check that URLs have been injected and news are getting fetched on [http://localhost:9200/status/_search?pretty]. Or use StormCrawler's Kibana dashboards to monitor the crawling process. Please follow the instructions to install the templates for Kibana provided as part of StormCrawler's Elasticsearch module documentation.

There is also a shell script bin/es_status to get aggregated counts from the status index, and to add, delete or force a re-fetch of URLs. E.g.,

$> bin/es_status aggregate_status 3824 DISCOVERED 34 FETCHED 5 REDIRECTION

Run Crawl from Docker Container

First, download Apache Storm 1.2.4. from the download page and place it in the directory downloads:

STORM_VERSION=1.2.4 mkdir downloads wget -q -P downloads --timestamping https://downloads.apache.org/storm/apache-storm-$STORM_VERSION/apache-storm-$STORM_VERSION.tar.gz

Do not forget to create the uberjar (see above) which is included in the Docker image. Simply run:

mvn clean package

Then build the Docker image from the Dockerfile:

Note: the uberjar is included in the Docker image and needs to be built first (see above).

docker build -t newscrawler:1.18.1 .

To launch an interactive container:

docker run --net=host \ -v $PWD/data/elasticsearch:/data/elasticsearch \ -v $PWD/data/warc:/data/warc \ --rm --name newscrawler -i -t newscrawler:1.18.1 /bin/bash

NOTE: don't forget to adapt the paths to mounted volumes used to persist data on the host. Make sure to add the user agent configuration in conf/crawler-conf.yaml.

CAVEAT: Make sure that the Elasticsearch port 9200 is not already in use or mapped by a running ES instance. Otherwise Elasticsearch commands may affect the running instance!

The crawler is launched in the running container by the script

/home/ubuntu/news-crawler/bin/run-crawler.sh

After 1-2 minutes if everything is up, connect to Elasticsearch on port 9200 or Kibana on port 5601.

Owner

  • Name: Common Crawl Foundation
  • Login: commoncrawl
  • Kind: organization
  • Email: info@commoncrawl.org

Common Crawl provides an archive of webpages going back to 2007.

GitHub Events

Total
  • Issues event: 1
  • Watch event: 32
  • Issue comment event: 19
  • Push event: 1
  • Pull request review event: 6
  • Pull request review comment event: 5
  • Pull request event: 3
  • Fork event: 5
Last Year
  • Issues event: 1
  • Watch event: 32
  • Issue comment event: 19
  • Push event: 1
  • Pull request review event: 6
  • Pull request review comment event: 5
  • Pull request event: 3
  • Fork event: 5

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 148
  • Total Committers: 2
  • Avg Commits per committer: 74.0
  • Development Distribution Score (DDS): 0.135
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Sebastian Nagel s****n@c****g 128
Julien Nioche j****n@d****m 20
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 55
  • Total pull requests: 12
  • Average time to close issues: 4 months
  • Average time to close pull requests: 2 months
  • Total issue authors: 16
  • Total pull request authors: 3
  • Average comments per issue: 2.95
  • Average comments per pull request: 1.42
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 7
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 22 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 2.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sebastian-nagel (30)
  • jnioche (8)
  • john-hewitt (2)
  • chris-ha458 (1)
  • kaal-zathura24 (1)
  • sljlp (1)
  • brand17 (1)
  • randomgambit (1)
  • sandeepsingh (1)
  • fhamborg (1)
  • raphaelzhou1 (1)
  • rishrockstar (1)
  • staylor-ds (1)
  • Ashbajawed (1)
  • zikolach (1)
Pull Request Authors
  • dependabot[bot] (7)
  • silentninja (4)
  • jnioche (1)
Top Labels
Issue Labels
bug (5) question (5) enhancement (3) wontfix (1) docker (1)
Pull Request Labels
dependencies (7)

Dependencies

pom.xml maven
  • org.apache.storm:storm-core 1.2.3 provided
  • com.digitalpebble.stormcrawler:storm-crawler-core 1.18
  • com.digitalpebble.stormcrawler:storm-crawler-elasticsearch 1.18
  • com.digitalpebble.stormcrawler:storm-crawler-warc 1.18
  • com.fasterxml.jackson.core:jackson-databind 2.11.1
  • com.github.crawler-commons:crawler-commons 1.1
  • org.apache.storm:flux-core 1.2.3
  • com.digitalpebble.stormcrawler:storm-crawler-core 1.18 test
  • com.github.tomakehurst:wiremock 2.26.3 test
  • org.mockito:mockito-all 1.10.19 test
Dockerfile docker
  • ubuntu 18.04 build
.github/workflows/maven.yml actions
  • actions/checkout v2 composite
  • actions/setup-java v2 composite