Crawl KPU track record data. Features:
- Automatically download pdf for all candidates in your Dapil
- Skip zero bytes pdf file
Ideas? Please submit issues.
- Does not check whether pdf file is corrupt or not
- DPD is not supported yet, as the page layout is totally different
Note: This is still MVP, so manual works needed
- Clone this repo
- Change
dapil_id
value based on your own dapil, see - Run
scrapy runspider kpurawler.py
The number highlighted by red circle on the url is what we are looking for. Here's one way that I find works
- Go to KPU official site
- Click
Jenis Pemilihan
on the header - Click
Pileg 2019
on the dropdown - Click
Daerah Pemilihan
on the header, you'll see a map of Indonesia - Choose the option, eg.
DPRD Kabko
,Jawa Barat
,Cianjur
, you'll see another pop up on the right side - Click your Dapil, and you should be redirected to page illustrated
- Scrapy installed. See How to install Scrapy