Skip to content

Commit

Permalink
fix crawler parser
Browse files Browse the repository at this point in the history
  • Loading branch information
im6 committed Mar 10, 2021
1 parent 965ae64 commit 0952d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collect/task/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const fetchStarNum = (obj0, cb) => {
console.error(` ${githubUrl}/${obj.github} url not found.`); // eslint-disable-line no-console
obj.star = -1;
} else {
const starElem = elems[1];
const starElem = elems[0];
const numLabel = starElem.attribs['aria-label'];
const numStr = numLabel.split(' ')[0];
obj.star = parseInt(numStr, 10);
Expand Down

0 comments on commit 0952d34

Please sign in to comment.