From 9214ce14bbbe194b0d0b2de8b8277f0860bdb8f6 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Fri, 17 Nov 2017 17:15:56 -0500 Subject: [PATCH] Improved regex for pichunter.com --- .../ripme/ripper/rippers/PichunterRipper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/PichunterRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/PichunterRipper.java index 5b4b15fb..d9f63626 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/PichunterRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/PichunterRipper.java @@ -32,23 +32,23 @@ public class PichunterRipper extends AbstractHTMLRipper { @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("https?://www.pichunter.com/(|tags|models|sites)/([a-zA-Z0-9_-]+)/?"); + Pattern p = Pattern.compile("https?://www.pichunter.com/(|tags|models|sites)/(\\S*)/?"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(2); } - p = Pattern.compile("https?://www.pichunter.com/(tags|models|sites)/([a-zA-Z0-9_-]+)/photos/\\d+/?"); + p = Pattern.compile("https?://www.pichunter.com/(tags|models|sites)/(\\S*)/photos/\\d+/?"); m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(2); } - p = Pattern.compile("https?://www.pichunter.com/tags/all/([a-zA-Z0-9_-]+)/\\d+/?"); + p = Pattern.compile("https?://www.pichunter.com/tags/all/(\\S*)/\\d+/?"); m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); } - p = Pattern.compile("https?://www.pichunter.com/gallery/\\d+/([a-zA-Z0-9_-]+)/?"); + p = Pattern.compile("https?://www.pichunter.com/gallery/\\d+/(\\S*)/?"); m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); @@ -58,7 +58,7 @@ public class PichunterRipper extends AbstractHTMLRipper { } private boolean isPhotoSet(URL url) { - Pattern p = Pattern.compile("https?://www.pichunter.com/gallery/\\d+/([a-zA-Z0-9_-]+)/?"); + Pattern p = Pattern.compile("https?://www.pichunter.com/gallery/\\d+/(\\S*)/?"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return true;