import java.util.Scanner;
import java.util.Map.Entry;
+import org.json.JSONException;
import org.json.JSONObject;
import org.jsoup.helper.DataUtil;
import org.jsoup.nodes.Document;
pg.setProgress(30);
Story story = new Story();
+
MetaData meta = getMeta();
+ meta.setType(getType().toString());
+ meta.setSource(getType().getSourceName());
+ if (meta.getPublisher() == null) {
+ meta.setPublisher(getType().getSourceName());
+ }
+
if (meta.getCreationDate() == null
|| meta.getCreationDate().trim().isEmpty()) {
meta.setCreationDate(bsHelper
scan.useDelimiter("\0");
try {
return new JSONObject(scan.next());
+ } catch (JSONException e) {
+ throw new IOException(e);
} finally {
scan.close();
}