Giter Club home page Giter Club logo

ruby-web-scraper-kemkes's Introduction

Ruby Web Scraper (Studi Kasus: KemKes)

Ruby script untuk melakukan pencatatan data perhari berkenaan tentang "Situasi COVID-19" pada website KemKes.

Prerequisite

No. Gem Version
1 Ruby 2.7.1
2 PostgreSQL 12.3
3 HTTParty 0.18.1
4 Nokogiri 1.10.9
5 ActiveRecord 6.0.3
6 Standalone_Migrations 6.0.0
7 pg 1.2.3
8 whenever 1.0

Menjalankan Script

$ rake run

Menjalankan Commit untuk Seed

$ rake db:seed:commit

Mereset Data Tabel

$ rake db:reset

Automatic Scraping

Saya menambahkan fungsi penjadwalan proses scraping dengan bantuan whenever gem.

Untuk mengaktifkan dan membuatnya berjalan pada saat sistem dinyalakan.

Aktifkan cronie service.

$ sudo systemctl enable --now cronie.service

Lalu, daftarkan penjadwalan ke crontab.

$ whenever --update-crontab

Secara default saya menjadwalkan script ini akan melakukan scraping setiap hari pada jam 05.00 PM.

Hal-hal yang perlu dipastikan akan proses automatisasi berjalan dengan baik.

  1. PostgreSQL service sudah berjalan
  2. Cronie service sudah berjalan

ruby-web-scraper-kemkes's People

Contributors

bandithijo avatar

Stargazers

 avatar Roman avatar

Watchers

James Cloos avatar  avatar

Forkers

anggbelpas

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.