Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- V2CHttpUtil_old.java Sun Mar 22 17:04:12 2015
- +++ V2CHttpUtil.java Mon Dec 07 12:06:53 2015
- @@ -83,2 +83,5 @@
- .compile("<dt>([0-9]*).+(<a href=\"(.+)\">(.+)<\\/a>|<font color=green>(.+)<\\/font>):(.+)<dd>(.+)<br><br>");
- + static Pattern html2dat_potato = Pattern
- + .compile("<div class=\"post\"[^>]+?><div class=\"number\">([0-9]*).+?<\\/div><div class=\"name\"><b>(<a href=\"(.+?)\">(.+?)<\\/a>|(.+?))<\\/b><\\/div><div class=\"date\">(.+?)<\\/div><div class=\"message\">(.+?)<\\/div><\\/div>");
- +
- private static String sid;
- @@ -977,3 +980,9 @@
- StringBuffer buff = new StringBuffer();
- - Matcher datMatcher = html2dat.matcher(orig);
- + Matcher datMatcher;
- +
- + if (orig.contains("<dl class=\"thread\""))
- + datMatcher = html2dat.matcher(orig);
- + else
- + datMatcher = html2dat_potato.matcher(orig);
- +
- while (datMatcher.find()) {
- @@ -1000,3 +1009,3 @@
- if (currRes == 1) {
- - Pattern titlePat = Pattern.compile("<title>([^<]+)<\\/title>");
- + Pattern titlePat = Pattern.compile("<title>([^<]+)(:|\\n)<\\/title>");
- Matcher m = titlePat.matcher(orig);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement