1
1
package com .rarchives .ripme .ripper .rippers ;
2
2
3
- import com .rarchives .ripme .ripper .AbstractHTMLRipper ;
4
- import com .rarchives .ripme .utils .Http ;
5
- import org .jsoup .nodes .Document ;
6
- import org .jsoup .nodes .Element ;
7
-
8
3
import java .io .IOException ;
9
4
import java .net .MalformedURLException ;
10
5
import java .net .URL ;
13
8
import java .util .regex .Matcher ;
14
9
import java .util .regex .Pattern ;
15
10
11
+ import org .jsoup .nodes .Document ;
12
+ import org .jsoup .nodes .Element ;
16
13
17
- public class HentaiimageRipper extends AbstractHTMLRipper {
18
-
14
+ import com . rarchives . ripme . ripper . AbstractHTMLRipper ;
15
+ import com . rarchives . ripme . utils . Http ;
19
16
17
+ public class HentaiimageRipper extends AbstractHTMLRipper {
20
18
public HentaiimageRipper (URL url ) throws IOException {
21
19
super (url );
22
20
}
@@ -43,13 +41,13 @@ public boolean canRip(URL url) {
43
41
44
42
@ Override
45
43
public String getGID (URL url ) throws MalformedURLException {
46
- Pattern p = Pattern .compile ("https://(?:\\ w\\ w\\ .)?hentai-(image|comic).com/image/([a-zA-Z0-9_-]+)/?" );
44
+ Pattern p = Pattern .compile ("https://(?:\\ w\\ w\\ .)?hentai-(image|comic|img-xxx ).com/image/([a-zA-Z0-9_-]+)/?" );
47
45
Matcher m = p .matcher (url .toExternalForm ());
48
46
if (m .matches ()) {
49
47
return m .group (1 );
50
48
}
51
49
throw new MalformedURLException ("Expected hitomi URL format: " +
52
- "https://hentai-image .com/image/ID - got " + url + " instead" );
50
+ "https://hentai-img-xxx .com/image/ID - got " + url + " instead" );
53
51
}
54
52
55
53
@ Override
0 commit comments