Update jsoup library (#5902)

This commit is contained in:
Taco 2022-05-26 03:59:10 -04:00 committed by GitHub
parent b1668a156a
commit 89cfeb93db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 6 deletions

View File

@ -51,7 +51,7 @@ project.ext {
// Third-party // Third-party
commonslangVersion = "3.6" commonslangVersion = "3.6"
commonsioVersion = "2.5" commonsioVersion = "2.5"
jsoupVersion = "1.11.2" jsoupVersion = "1.15.1"
glideVersion = "4.8.0" glideVersion = "4.8.0"
okhttpVersion = "3.12.10" okhttpVersion = "3.12.10"
okioVersion = "1.17.5" okioVersion = "1.17.5"

View File

@ -24,6 +24,9 @@ android {
packagingOptions { packagingOptions {
exclude "META-INF/LICENSE.txt" exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt" exclude "META-INF/NOTICE.txt"
// Extraneous jsoup files
exclude "META-INF/CHANGES"
exclude "META-INF/README.md"
} }
compileOptions { compileOptions {

View File

@ -32,7 +32,7 @@ public class FeedDiscoverer {
* a title cannot be found). * a title cannot be found).
*/ */
public Map<String, String> findLinks(File in, String baseUrl) throws IOException { public Map<String, String> findLinks(File in, String baseUrl) throws IOException {
return findLinks(Jsoup.parse(in, null), baseUrl); return findLinks(Jsoup.parse(in), baseUrl);
} }
/** /**

View File

@ -4,7 +4,7 @@ import android.text.TextUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.helper.StringUtil; import org.jsoup.internal.StringUtil;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node; import org.jsoup.nodes.Node;

View File

@ -86,9 +86,8 @@ public class TypeGetter {
// XML document might actually be a HTML document -> try to parse as HTML // XML document might actually be a HTML document -> try to parse as HTML
String rootElement = null; String rootElement = null;
try { try {
if (Jsoup.parse(new File(feed.getFile_url()), null) != null) { Jsoup.parse(new File(feed.getFile_url()));
rootElement = "html"; rootElement = "html";
}
} catch (IOException e1) { } catch (IOException e1) {
e1.printStackTrace(); e1.printStackTrace();
} }