parent
083cd8d7cc
commit
c3b82fff32
@ -328,11 +328,15 @@ public abstract class AbstractRipper
|
|||||||
} catch (HttpStatusException e) {
|
} catch (HttpStatusException e) {
|
||||||
logger.error("Got exception while running ripper:", e);
|
logger.error("Got exception while running ripper:", e);
|
||||||
waitForThreads();
|
waitForThreads();
|
||||||
sendUpdate(STATUS.RIP_ERRORED, "Status=" + e.getStatusCode() + ", URL=" + e.getUrl());
|
sendUpdate(STATUS.RIP_ERRORED, "HTTP status code " + e.getStatusCode() + " for URL " + e.getUrl());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Got exception while running ripper:", e);
|
logger.error("Got exception while running ripper:", e);
|
||||||
waitForThreads();
|
waitForThreads();
|
||||||
sendUpdate(STATUS.RIP_ERRORED, e.getMessage());
|
sendUpdate(STATUS.RIP_ERRORED, e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Got exception while running ripper:", e);
|
||||||
|
waitForThreads();
|
||||||
|
sendUpdate(STATUS.RIP_ERRORED, e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
@ -109,7 +110,12 @@ public class InstagramRipper extends AbstractJSONRipper {
|
|||||||
String baseURL = "http://iconosquare.com/controller_nl.php?action=getPhotoUserPublic&user_id="
|
String baseURL = "http://iconosquare.com/controller_nl.php?action=getPhotoUserPublic&user_id="
|
||||||
+ userID;
|
+ userID;
|
||||||
logger.info("Loading " + baseURL);
|
logger.info("Loading " + baseURL);
|
||||||
return Http.url(baseURL).getJSON();
|
try {
|
||||||
|
JSONObject result = Http.url(baseURL).getJSON();
|
||||||
|
return result;
|
||||||
|
} catch (JSONException e) {
|
||||||
|
throw new IOException("Could not get instagram user via iconosquare", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user