Spaces:
Sleeping
Sleeping
Update scraper.py
Browse files- scraper.py +2 -1
scraper.py
CHANGED
|
@@ -12,13 +12,14 @@ def fetch_tariff_from_url(url, load_type):
|
|
| 12 |
tariff_text = soup.get_text()
|
| 13 |
|
| 14 |
load_type_mapping = {
|
| 15 |
-
"
|
| 16 |
"Commercial": "A-2 GENERAL SUPPLY TARIFF COMMERCIAL",
|
| 17 |
"Industrial": "B - INDUSTRIAL SUPPLY TARIFFS",
|
| 18 |
"Agriculture": "D - AGRICULTURE TARIFF"
|
| 19 |
}
|
| 20 |
|
| 21 |
load_type_label = load_type_mapping.get(load_type, None)
|
|
|
|
| 22 |
if load_type_label:
|
| 23 |
start_idx = tariff_text.find(load_type_label)
|
| 24 |
if start_idx != -1:
|
|
|
|
| 12 |
tariff_text = soup.get_text()
|
| 13 |
|
| 14 |
load_type_mapping = {
|
| 15 |
+
"Domestic": "A-1 GENERAL SUPPLY TARIFF RESIDENTIAL",
|
| 16 |
"Commercial": "A-2 GENERAL SUPPLY TARIFF COMMERCIAL",
|
| 17 |
"Industrial": "B - INDUSTRIAL SUPPLY TARIFFS",
|
| 18 |
"Agriculture": "D - AGRICULTURE TARIFF"
|
| 19 |
}
|
| 20 |
|
| 21 |
load_type_label = load_type_mapping.get(load_type, None)
|
| 22 |
+
|
| 23 |
if load_type_label:
|
| 24 |
start_idx = tariff_text.find(load_type_label)
|
| 25 |
if start_idx != -1:
|