FIX: HTML hatte sich geändert (Einheit 'km' wurde aus Entfernungsangabe entfernt)
This commit is contained in:
parent
08cc0e1474
commit
36324f2723
@ -65,7 +65,7 @@ public class OfferCreate {
|
||||
articleDate = parseDate(article.select(".aditem-main--top--right").text());
|
||||
articleURL = uri.resolve(article.select(".aditem-image a").attr("href")).toString();
|
||||
final String locationString = article.select(".aditem-main--top--left").text();
|
||||
final Matcher locationMatcher = Pattern.compile("^(?<zipcode>\\d+) (?<location>.+) \\((:?ca.)?\\s*(?<distance>\\d+(?:[,.]\\d+)?)\\s*km\\s*\\)$").matcher(locationString);
|
||||
final Matcher locationMatcher = Pattern.compile("^(?<zipcode>\\d+) (?<location>.+) \\((:?ca.)?\\s*(?<distance>\\d+(?:[,.]\\d+)?)\\s*(?:km)?\\s*\\)$").matcher(locationString);
|
||||
if (!locationMatcher.find()) {
|
||||
throw new LocationNotFound();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user