Offer distance parse 0.0 as int FIX
This commit is contained in:
parent
f9e67f0531
commit
e3a64c70b9
@ -71,7 +71,7 @@ public class OfferCreate {
|
|||||||
}
|
}
|
||||||
zipcode = locationMatcher.group("zipcode");
|
zipcode = locationMatcher.group("zipcode");
|
||||||
location = locationMatcher.group("location");
|
location = locationMatcher.group("location");
|
||||||
distance = Integer.parseInt(locationMatcher.group("distance"));
|
distance = (int) Math.round(Double.parseDouble(locationMatcher.group("distance")));
|
||||||
imageURL = getImageURL(articleURL);
|
imageURL = getImageURL(articleURL);
|
||||||
|
|
||||||
final Matcher priceMatcher = Pattern.compile("(?<price>\\d+(?:[,.]\\d+)?) €(?<negotiable> VB)?").matcher(article.select(".aditem-main--middle--price-shipping--price").text());
|
final Matcher priceMatcher = Pattern.compile("(?<price>\\d+(?:[,.]\\d+)?) €(?<negotiable> VB)?").matcher(article.select(".aditem-main--middle--price-shipping--price").text());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user