Skip to content

Commit

Permalink
fix issue-226 parse problem
Browse files Browse the repository at this point in the history
  • Loading branch information
caodongping committed Oct 11, 2016
1 parent ae6dd04 commit 1beaece
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -23,9 +23,12 @@ public List<Object> parse(String issue) throws IOException {
String currentSection = null;
for (Element e : tables) {
Elements h2 = e.getElementsByTag("h2");
if (!h2.isEmpty()) {
currentSection = h2.get(0).text();
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();
if (!articles.contains(currentSection)) {
articles.add(currentSection);
}
} else {
Elements tds = e.getElementsByTag("td");
Element td = tds.get(tds.size() - 2);
Expand Down

0 comments on commit 1beaece

Please sign in to comment.