Code Monkey home page Code Monkey logo

aws-news-crawler's Introduction

A dog with a press hat and a cigar

NewHound: AWS Lambda based Web Crawler

A Serverless.js project that sets up lambda functions, SQS queues and communicates between them all via SNS. Pages are stored in an S3 bucket for cheap, scalable storage and for later processinf. This infrastructure allows unlimited scalability.

Content extraction is performed algorithmlically and content is grouped by langauge (possibly region?).

System Architecture

Setup

Setup requires npm installed and pipenv install.

npm install
pipenv install

Deployment

sls deploy --stage dev|prod

caveats:

  • It expects the pages bucket to already exist
  • Note, this will fail if any of the DynamoDB tables already exist :(

Removal

sls remove --stage dev|prod

caveats: - does not remove the DynamoDB tables. - Does not remove the S3 bucket.

Testing

locally:

pipenv shell
python -m pytest

remotely try (replacing the 'kqoorz3y6h' with real hash):

curl -X POST -d '{ "url": "http://feeds.bbci.co.uk/news/rss.xml" }' https://kqoorz3y6h.execute-api.eu-west-1.amazonaws.com/dev/add_rss

TODOs

  • Ingest sitemap.xml files taken from the root or the robots.txt
  • Near-duplicates detection via shingling.

aws-news-crawler's People

Contributors

awhillas avatar

Stargazers

Ahmed Abbas avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.