projects
/
rhynodge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
⬆️ Upgrade kotlinx-html
[rhynodge.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
rhynodge
/
filters
/
torrents
/
TorrentzEuFilter.java
diff --git
a/src/main/java/net/pterodactylus/rhynodge/filters/torrents/TorrentzEuFilter.java
b/src/main/java/net/pterodactylus/rhynodge/filters/torrents/TorrentzEuFilter.java
index
57be6f0
..
2b071c0
100644
(file)
--- a/
src/main/java/net/pterodactylus/rhynodge/filters/torrents/TorrentzEuFilter.java
+++ b/
src/main/java/net/pterodactylus/rhynodge/filters/torrents/TorrentzEuFilter.java
@@
-46,12
+46,19
@@
public class TorrentzEuFilter extends TorrentSiteFilter {
@Override
protected int extractSeedCount(Element dataRow) {
@Override
protected int extractSeedCount(Element dataRow) {
- return
Integer.valueOf
(dataRow.select("dd span.u").text());
+ return
extractNumber
(dataRow.select("dd span.u").text());
}
@Override
protected int extractLeechCount(Element dataRow) {
}
@Override
protected int extractLeechCount(Element dataRow) {
- return Integer.valueOf(dataRow.select("dd span.d").text());
+ return extractNumber(dataRow.select("dd span.d").text());
+ }
+
+ private int extractNumber(String text) {
+ if ((text == null) || text.isEmpty()) {
+ return 0;
+ }
+ return Integer.valueOf(text.replace(",", ""));
}
}
}
}