Update
This commit is contained in:
1 parent
f3a7bcbfd3
commit
705dd16541
37 files changed
+624
-597
No files matched your search
@@ -18,6 +18,9 @@ package com.hippo.ehviewer;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
public class DumpTest extends TestCase {
|
||||
|
||||
|
||||
@@ -26,4 +29,22 @@ public class DumpTest extends TestCase {
|
||||
System.out.println(str.replaceAll("\\d+(\\.\\d+)?", "12"));
|
||||
}
|
||||
|
||||
public void testDumpURL() {
|
||||
String str1 = "http://exhentai.org/?f_doujinshi=1&f_manga=0&f_artistcg=0&f_gamecg=1&f_western=1&f_non-h=1&f_imageset=0&f_cosplay=0&f_asianporn=1&f_misc=1&f_search=&f_apply=Apply+Filter";
|
||||
String str2 = "http://exhentai.org/3?f_search=hentai&f_apply=Apply+Filter";
|
||||
try {
|
||||
URL url = new URL(str2);
|
||||
|
||||
|
||||
System.out.println(url.getHost());
|
||||
System.out.println(url.getPath());
|
||||
System.out.println(url.getQuery());
|
||||
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user