@@ -0,0 +1,1041 @@
+package de.eightbitboy.hijacr.data.database;%0A%0Aimport android.os.AsyncTask;%0A%0Aimport com.orhanobut.logger.Logger;%0A%0Aimport org.jsoup.Jsoup;%0Aimport org.jsoup.nodes.Document;%0Aimport org.jsoup.select.Elements;%0A%0Aimport java.io.IOException;%0A%0Aimport de.eightbitboy.hijacr.data.ComicManager;%0A%0Apublic class ComicFetchTask extends AsyncTask%3CVoid, Void, String%3E %7B%0A%0A%09private String targetUrl;%0A%09private String imageQuery;%0A%09private ComicManager manager;%0A%0A%09public ComicFetchTask(String baseUrl, int number, String imageQuery, ComicManager manager) %7B%0A%09%09this.targetUrl = baseUrl + number;%0A%09%09this.imageQuery = imageQuery;%0A%09%09this.manager = manager;%0A%09%7D%0A%0A%09@Override%0A%09protected String doInBackground(Void... voids) %7B%0A%09%09Logger.d(%22target url: %22 + targetUrl);%0A%0A%09%09try %7B%0A%09%09%09Document page = Jsoup.connect(targetUrl).get();%0A%09%09%09Elements image = page.select(imageQuery);%0A%09%09%09return image.attr(%22abs:src%22);%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%0A%09@Override%0A%09protected void onPostExecute(String s) %7B%0A%09%09manager.onGetSimpleImageSource(s);%0A%09%7D%0A%7D%0A

Add new ComicFetchTask