- String body = "";
- for (Element elem : story.children()) {
- String tag = elem.tag().toString();
- if (!tag.equals("header") && !tag.equals("footer")) {
- body = elem.text();
- break;
- }
+ return value;
+ }
+
+ return "";
+ }
+
+ @Override
+ protected String getArticleDate(Document doc, Element article) {
+ Element dateElement = article.getElementsByTag("time").first();
+ if (dateElement != null) {
+ return dateElement.attr("datetime");
+ }
+
+ return "";
+ }
+
+ @Override
+ protected String getArticleCategory(Document doc, Element article,
+ String currentCategory) {
+ String value = getArticleDetailsReal(article);
+ int pos = value.indexOf(" in ");
+ if (pos >= 0) {
+ value = value.substring(pos + " in ".length()).trim();
+ pos = value.indexOf(" on ");
+ if (pos >= 0) {
+ value = value.substring(0, pos).trim();