us.codecraft.webmagic.utils.BaseSelectorUtils Maven / Gradle / Ivy
The newest version!
package us.codecraft.webmagic.utils;
/**
* @author hooy
*/
public class BaseSelectorUtils {
/**
* Jsoup/HtmlCleaner could not parse "tr" or "td" tag directly
* https://stackoverflow.com/questions/63607740/jsoup-couldnt-parse-tr-tag
*
* @param text - the html string
* @return text
*/
public static String preParse(String text) {
if (((text.startsWith("") || text.startsWith(" "))
|| ((text.startsWith("") || text.startsWith(" "))) {
text = "" + text + "
";
}
return text;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy