Skip to content

Commit

Permalink
fix page parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
imsun committed Jan 9, 2017
1 parent 4bd1388 commit c298c54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function *genFeedFromPage() {
const doc = parser.parseFromString(res.body, 'text/html')
const issues = []
const ul = doc.getElementsByTagName('ul')[1]
if (ul && ul.getAttribute('class') === 'Box-body js-navigation-container js-active-navigation-container') {
if (ul && ul.getAttribute('class') === 'js-navigation-container js-active-navigation-container') {
Array.from(ul.getElementsByTagName('li'))
.forEach(li => {
const issue = {}
Expand Down Expand Up @@ -204,8 +204,7 @@ function *genFeedFromPage() {
const doc = parser.parseFromString(body, 'text/html')
const contentElement = doc
.getElementById(id)
.childNodes[3]
.childNodes[1]
.getElementsByTagName('td')[0]
.childNodes
issue.description = serlializer.serializeToString(contentElement)
feed.item(issue)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"marked": "^0.3.6",
"rss": "^1.2.1",
"string": "^3.3.3",
"xmldom": "^0.1.22"
"xmldom": "0.1.22"
}
}

0 comments on commit c298c54

Please sign in to comment.