Giter Club home page Giter Club logo

4people's Introduction

About the Project

This is a test assignment for the 4people. The project allows to scrape news web sites based on CSS selector rules and store the news content in the database.

Live version

Features

  • adding custom sources
  • scraping
    • requires user action
    • go to Manage tab, pick one source and press Scrape!
    • wait at least 15-20 seconds, you should see debug output
    • crawler has a timeout and page limit to prevent abuse
  • viewing saved article previews, paginated
  • viewing full article content with image (if parsed successfully)
  • providing links to original articles

Project structure and things implemented

  • two models: Source and Article with respective controllers
  • dependency injection:
    • Crawler implements CrawlerInterface, injected in AppServiceProvider
    • ArticleService is injected automatically into SourceController by Laravel
  • custom crawler exceptions CrawlerException and CrawlerLinksNotFoundException with implemented render methods
  • crawler page limit and timeout are configured through env variables CRAWL_PAGE_LIMIT and CRAWL_SLEEP_MICROSECONDS
  • database migrations with two source seeders (for rbc.ru and lenta.ru)

Things not implemented

  • l10n/i18n
  • testing

Database schema

db schema

License

The Laravel framework is open-sourced software licensed under the MIT license.

Built with Laravel and Tailwind CSS

4people's People

Contributors

atru avatar

Watchers

 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.