public static String getCharset(String contentType) {
        if (contentType == null) {
            return null;
        }

        Matcher matcher = patternForCharset.matcher(contentType);
        if (matcher.find()) {
            String charset = matcher.group(1);
            if (Charset.isSupported(charset)) {
                return charset;
            }
        }
        return null;
    }
@param url url
@return new url
@deprecated
webmagic-core/src/main/java/us/codecraft/webmagic/utils/UrlUtils.java