We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae6dd04 commit 1beaeceCopy full SHA for 1beaece
1 file changed
app/src/main/java/com/github/mzule/androidweekly/api/parser/FresherArticlesParser.java
@@ -23,9 +23,12 @@ public List<Object> parse(String issue) throws IOException {
23
String currentSection = null;
24
for (Element e : tables) {
25
Elements h2 = e.getElementsByTag("h2");
26
- if (!h2.isEmpty()) {
27
- currentSection = h2.get(0).text();
28
- articles.add(currentSection);
+ Elements h5 = e.getElementsByTag("h5");// 兼容issue-226 SPONSORED 在 h5 标签里面
+ if (!h2.isEmpty() || !h5.isEmpty()) {
+ currentSection = h2.size() > 0 ? h2.get(0).text() : h5.get(0).text();
29
+ if (!articles.contains(currentSection)) {
30
+ articles.add(currentSection);
31
+ }
32
} else {
33
Elements tds = e.getElementsByTag("td");
34
Element td = tds.get(tds.size() - 2);
0 commit comments