Last active
May 17, 2019 05:58
-
-
Save lantip/ad735501e1a737cb742d5a2dfc24761c to your computer and use it in GitHub Desktop.
Script untuk menyimpan tangkap-layar dari laman KPU.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script ini hanyalah proof of concept untuk menyimpan laman satu website per 5 detik | |
# Script semacam ini sudah dibuktikan cara kerjanya oleh pak Budi Rahardjo di https://www.youtube.com/watch?v=DYlgavNY9LE | |
# Untuk menjalankan script ini dibutuhkan python3 dan library selenium dengan chromedriver | |
# POC ini hanya menyimpan 5 berkas saja. Anda bisa menambahkan sesuka Anda. | |
# Note: ini hanya script menyimpan screenshot, belum menjalankan fungsi seperti select input form. Itu akan ada di gist lain. | |
from selenium import webdriver | |
import time | |
browser = webdriver.Chrome() | |
browser.get('https://pemilu2019.kpu.go.id/#/ppwp/hitung-suara/') | |
for i in range(5): | |
browser.save_screenshot('Berkas Nomor '+str(i)+'.png') | |
browser.refresh() | |
time.sleep(5) | |
browser.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sip masé, matur nuwun