1package io.github.amithkoujalgi.fuelprices.impl;
3import io.github.amithkoujalgi.fuelprices.FetchHandler;
4import io.github.amithkoujalgi.fuelprices.types.FuelType;
6import org.jsoup.nodes.Document;
8import java.io.IOException;
12 String type = fuelType.name().toLowerCase();
13 Document doc = Jsoup.connect(String.format(
"https://www.ndtv.com/fuel-prices/%s-price-in-%s-city", type, city)).get();
14 return Float.parseFloat(doc.select(
".todyPricContnr .prcContnr .font-b").text().replace(
"₹/L",
""));
float fetch(String city, FuelType fuelType)