mirror of
https://github.com/moparisthebest/ComicReader
synced 2024-11-15 21:55:04 -05:00
Updated GunnerkriggCourt to correctly parse the page. Now loads the
comics correctly.
This commit is contained in:
parent
10b78e4bf8
commit
cc73f8ad5e
@ -12,12 +12,12 @@ public class GunnerkriggCourt extends IndexedComic {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getFrontPageUrl() {
|
protected String getFrontPageUrl() {
|
||||||
return "http://www.gunnerkrigg.com/index2.php";
|
return "http://www.gunnerkrigg.com/";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getComicWebPageUrl() {
|
public String getComicWebPageUrl() {
|
||||||
return "http://www.gunnerkrigg.com/index2.php";
|
return "http://www.gunnerkrigg.com/";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,7 +25,7 @@ public class GunnerkriggCourt extends IndexedComic {
|
|||||||
String str;
|
String str;
|
||||||
String final_str = null;
|
String final_str = null;
|
||||||
while((str = reader.readLine()) != null) {
|
while((str = reader.readLine()) != null) {
|
||||||
int index1 = str.indexOf("/comics");
|
int index1 = str.indexOf("/comics/");
|
||||||
if (index1 != -1) {
|
if (index1 != -1) {
|
||||||
final_str = str;
|
final_str = str;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ public class GunnerkriggCourt extends IndexedComic {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getIdFromStripUrl(String url) {
|
protected int getIdFromStripUrl(String url) {
|
||||||
return Integer.parseInt(url.replaceAll("http.*ID=", ""));
|
return Integer.parseInt(url.replaceAll("http.*comicID=", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,20 +60,17 @@ public class GunnerkriggCourt extends IndexedComic {
|
|||||||
throws IOException {
|
throws IOException {
|
||||||
String str;
|
String str;
|
||||||
String final_str = null;
|
String final_str = null;
|
||||||
String final_title = null;
|
|
||||||
while ((str = reader.readLine()) != null) {
|
while ((str = reader.readLine()) != null) {
|
||||||
int index1 = str.indexOf("/comics");
|
int index1 = str.indexOf("/comics/");
|
||||||
if (index1 != -1) {
|
if (index1 != -1) {
|
||||||
final_str = str;
|
final_str = str;
|
||||||
final_title = str;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final_str = final_str.replaceAll(".*src=\"","");
|
final_str = final_str.replaceAll(".*src=\"","");
|
||||||
final_str = final_str.replaceAll("\".*","");
|
final_str = final_str.replaceAll("\".*","");
|
||||||
final_title = final_title.replaceAll(".*alt=\"","");
|
strip.setTitle("Gunnerkrigg Court");
|
||||||
final_title = final_title.replaceAll("\".*","");
|
|
||||||
strip.setTitle("Gunnerkrigg Court- "+final_title);
|
|
||||||
strip.setText("-NA-");
|
strip.setText("-NA-");
|
||||||
return final_str;
|
return "http://www.gunnerkrigg.com" + final_str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user