diff options
| author | SammysHP <sven@sammyshp.de> | 2011-08-19 21:43:08 +0200 |
|---|---|---|
| committer | SammysHP <sven@sammyshp.de> | 2011-08-19 21:43:08 +0200 |
| commit | 23c3c11c2d2254b5e49f28088497bc615e2722e8 (patch) | |
| tree | 8296fedceced01f5b9a62765d808a3bea8c2d6bb | |
| parent | 4d226e4b565152f1a30c974779a93a2669f7f156 (diff) | |
| download | cgeo-23c3c11c2d2254b5e49f28088497bc615e2722e8.zip cgeo-23c3c11c2d2254b5e49f28088497bc615e2722e8.tar.gz cgeo-23c3c11c2d2254b5e49f28088497bc615e2722e8.tar.bz2 | |
Fix #247
| -rw-r--r-- | src/cgeo/geocaching/cgBase.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cgeo/geocaching/cgBase.java b/src/cgeo/geocaching/cgBase.java index c510e03..a5b93a1 100644 --- a/src/cgeo/geocaching/cgBase.java +++ b/src/cgeo/geocaching/cgBase.java @@ -2584,15 +2584,13 @@ public class cgBase { int findCount = -1; try { - final Pattern findPattern = Pattern.compile("<strong>Caches Found:<\\/strong>([^<]+)<br", Pattern.CASE_INSENSITIVE); + final Pattern findPattern = Pattern.compile("Finds\\s*</strong>\\s*<span class=\"statcount\">(\\d+)</span>", Pattern.CASE_INSENSITIVE); final Matcher findMatcher = findPattern.matcher(page); if (findMatcher.find()) { if (findMatcher.groupCount() > 0) { String count = findMatcher.group(1); if (count != null) { - count = count.trim().replaceAll(",", ""); - if (count.length() == 0) { findCount = 0; } else { |
