Reduce hardcoding in Wordpress comics (#299)
This commit is contained in:
parent
be916af8ce
commit
6ea6e7eded
@ -67,15 +67,17 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
return true;
|
||||
}
|
||||
|
||||
Pattern konradokonskiSawdustPat = Pattern.compile("http://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiSawdustMat = konradokonskiSawdustPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiSawdustMat.matches()) {
|
||||
Pattern konradokonskiPat = Pattern.compile("https?://www.konradokonski.com/([a-zA-Z0-9_-]*)/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiMat.matches()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Pattern konradokonskiWioryPat = Pattern.compile("http://www.konradokonski.com/wiory/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiWioryMat = konradokonskiWioryPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiWioryMat.matches()) {
|
||||
// This is hardcoded because it starts on the first page, unlike all the other
|
||||
// konradokonski which start on the last page
|
||||
konradokonskiPat = Pattern.compile("https?://www.konradokonski.com/aquartzbead/?$");
|
||||
konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiMat.matches()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -128,6 +130,7 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -145,16 +148,16 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
return "buttsmithy.com" + "_" + "Alfie";
|
||||
}
|
||||
|
||||
Pattern konradokonskiSawdustPat = Pattern.compile("http://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiSawdustMat = konradokonskiSawdustPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiSawdustMat.matches()) {
|
||||
return "konradokonski.com_sawdust";
|
||||
Pattern konradokonskiPat = Pattern.compile("http://www.konradokonski.com/([a-zA-Z]+)/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiMat.matches()) {
|
||||
return "konradokonski.com_" + konradokonskiMat.group(1);
|
||||
}
|
||||
|
||||
Pattern konradokonskiWioryPat = Pattern.compile("http://www.konradokonski.com/wiory/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiWioryMat = konradokonskiWioryPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiWioryMat.matches()) {
|
||||
return "konradokonski.com_wiory";
|
||||
konradokonskiPat = Pattern.compile("https?://www.konradokonski.com/aquartzbead/?$");
|
||||
konradokonskiMat = konradokonskiPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiMat.matches()) {
|
||||
return "konradokonski.com_aquartzbead";
|
||||
}
|
||||
|
||||
Pattern freeadultcomixPat = Pattern.compile("https?://freeadultcomix.com/([a-zA-Z0-9_\\-]*)/?$");
|
||||
|
Loading…
Reference in New Issue
Block a user