Giter Site home page Giter Site logo

evgeniradev / page_scraper Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 286 KB

An Elixir-based page scraper app built on Phoenix. It detects changes on a given web page and logs them to a database.

Dockerfile 0.40% JavaScript 6.62% Elixir 83.57% HTML 8.70% Shell 0.71%
elixir phoenix scraper

page_scraper's Introduction

PageScraper

An Elixir-based page scraper app built on Phoenix. It detects changes on a given web page and logs them to a database. It uses Selenium and the Hound package to load pages in a Chrome session. Currently, the app uses a single Chrome session, which has an impact on the polling speed when more than 1 pages are being polled at the same time.

Installation

Please, use Docker to use the app.

Run the below setup command to build the containers, create a new database and run the migrations. Please note, the command drops any existing database.

$ ./setup.sh

Start the app in development mode:

$ ./start.sh

Finally, load http://localhost in your browser.

Running the tests

$ ./test.sh

Details

Create a .env file in the app's root directory to use the below options.

To specify a Timezone, add the following environment variable to the file:

TZ=your_time_zone         Default: Europe/London

To specify the limit of logged changes per page, add the following environment variable to the file:

PAGE_CHANGES_LIMIT=100    Default: 100

To-do list

  • Add a Healthcheck to the page_scraper_selenium_chrome docker container
  • Display live workers' status using channels/WebSockets
  • Improve and finish off tests
  • Improve frontend/design
  • Implement a way to get page status before pulling page source
  • Implement pagination
  • Implement multiple Chrome sessions

page_scraper's People

Contributors

evgeniradev avatar

Stargazers

 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.