This script downloads daily reports on the Philippine Dealing System's benchmark government securities rates found at http://www.pds.com.ph/index.html%3Fpage_id=15256.html.
Although the PDS reports page allow you to download each report file in .csv format, the site currently doesn't support bulk downloads. So if you're looking for a way to do that without the mindless tedium of repetitive clicking, then you might find this script a bit useful.
This script runs on Python 2.7 and requires the following:
- python-dateutil (
pip install python-dateutil
) - requests (
pip install requests
) - six (already comes installed along with python-dateutils)
Just cd to the project's root directory and run:
$ python downloader.py
Next, enter the desired date range on the user prompt that appears. To accept the defaults (the report file for the current date), just leave the items blank. To download just one report from a previous date, enter the desired report date on either or both the start and end fields. Please make sure that you enter a date using conventional date formats.
The downloaded CSV files are saved in the Downloads
directory of the project folder.
Please contribute to this project in whatever capacity. Thanks.