Improve GallerySpider

This commit is contained in:
seven332 committed 2015-07-21 10:33:04 +08:00
1 parent ec7e3948d9
commit 702376979a
32 files changed
+2181 -528

No files matched your search

@@ -53,7 +53,7 @@ class EhEngine {
String body = response.getString();
return SignInParser.parse(body);
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;
@@ -71,7 +71,7 @@ class EhEngine {
String body = response.getString();
return GalleryListParser.parse(body, source);
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;
@@ -93,7 +93,7 @@ class EhEngine {
String body = response.getString();
return PopularParser.parse(body);
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;
@@ -116,7 +116,7 @@ class EhEngine {
GalleryDetailParser.REQUEST_PREVIEW |
GalleryDetailParser.REQUEST_COMMENT);
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;
@@ -134,7 +134,7 @@ class EhEngine {
String body = response.getString();
return GalleryDetailParser.parsePreview(body, source);
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;
@@ -174,7 +174,7 @@ class EhEngine {
return list;
} catch (Exception e) {
if (httpRequest.isCanceled()) {
if (httpRequest.getState() == HttpRequest.STATE_DISCONNECT) {
throw new CanceledException();
} else {
throw e;