(String s)
| 36 | |
| 37 | //去除标题中的一些无关信息 |
| 38 | public static String outTag(String s) |
| 39 | { |
| 40 | String title = s.replaceAll("<.*?>", ""); |
| 41 | title=replaceBlank(title); |
| 42 | title = title.replace("首页", ""); |
| 43 | title = title.replace("-", ""); |
| 44 | title = title.replace("主页", ""); |
| 45 | title = title.replace("官网", ""); |
| 46 | title = title.replace("欢迎进入", ""); |
| 47 | title = title.replace("欢迎访问", ""); |
| 48 | title = title.replace("登录入口", ""); |
| 49 | return title; |
| 50 | } |
| 51 | |
| 52 | //除去标题字符串中的\t制表符 \n回车 \r换行符 |
| 53 | public static String replaceBlank(String str) { |