-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0227566
commit dee3c25
Showing
1 changed file
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
# LESCO Bill Downloader | ||
|
||
This project scrapes the website lesco.gov.pk to download bills either as pdf or html page (Whichever is available) | ||
This project scrapes the website lesco.gov.pk and dbill.ptcl.net.pk to download bills either as pdf. | ||
|
||
## Dependencies | ||
- wget | ||
- curl | ||
- node.js | ||
- chrome/chromium installed for converting html to PDF | ||
|
||
## Configuration | ||
Add the customer ids in the file customer_ids.json. Following will be its format: | ||
```json | ||
[ | ||
{"id":YOUR_ID, format:"html/pdf"} | ||
] | ||
{ | ||
"lesco": [ | ||
{"id":"YOUR_ID", "format":"html/pdf", "tag": "TAG"} | ||
], | ||
"ptcl": [ | ||
{ "phone": "PHONE_WITHOUT_AREA_CODE", "account_id": "ACCOUNT_ID", "tag":"TAG"} | ||
] | ||
} | ||
``` | ||
### Running | ||
```bash | ||
node index.js | ||
``` | ||
The downloaded bills will be placed in `downloads` folder. | ||
The downloaded bills will be placed in `downloads` folder in the format: | ||
``` | ||
downloads: | ||
- BILL_MONTH (2022-01): | ||
- TAG (home/office): | ||
- ID.pdf | ||
- PTCL_phone_num.pdf | ||
``` |