mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-05 05:17:30 +02:00
cleaned up comments
This commit is contained in:
@@ -7,10 +7,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||||
import com.rarchives.ripme.utils.Http;
|
import com.rarchives.ripme.utils.Http;
|
||||||
|
|
||||||
@@ -56,19 +54,12 @@ public class FreeComicOnlineRipper extends AbstractHTMLRipper {
|
|||||||
public Document getNextPage(Document doc) throws IOException {
|
public Document getNextPage(Document doc) throws IOException {
|
||||||
String nextPage = doc.select("div.select-pagination a").get(1).attr("href");
|
String nextPage = doc.select("div.select-pagination a").get(1).attr("href");
|
||||||
String nextUrl = "";
|
String nextUrl = "";
|
||||||
// "https://freecomiconline.me/comic/([a-zA-Z0-9_\\-]+)/([a-zA-Z0-9_\\-]+)/?$"
|
|
||||||
System.out.println("\n\nPagination.(0).href: "+ nextPage);
|
|
||||||
|
|
||||||
Pattern p = Pattern.compile("https://freecomiconline.me/comic/([a-zA-Z0-9_\\-]+)/([a-zA-Z0-9_\\-]+)/?$");
|
Pattern p = Pattern.compile("https://freecomiconline.me/comic/([a-zA-Z0-9_\\-]+)/([a-zA-Z0-9_\\-]+)/?$");
|
||||||
Matcher m = p.matcher(nextPage);
|
Matcher m = p.matcher(nextPage);
|
||||||
|
|
||||||
if(m.matches()){
|
if(m.matches()){
|
||||||
nextUrl = m.group(0);
|
nextUrl = m.group(0);
|
||||||
//System.out.println("\n\nMatched and recreatedUrl: "+ nextUrl+"\n\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(nextUrl.equals("")) throw new IOException("No more pages");
|
if(nextUrl.equals("")) throw new IOException("No more pages");
|
||||||
|
|
||||||
sleep(500);
|
sleep(500);
|
||||||
return Http.url(nextUrl).get();
|
return Http.url(nextUrl).get();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user