Skip to content

Commit

Permalink
fix: update parser to use data attribute for counts (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebull authored and sebinsua committed Aug 29, 2018
1 parent c7535ee commit 00dda31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/parser.js
Expand Up @@ -246,25 +246,25 @@ const toTwitterProfile = ({ $ }) => {
$nav
.find('.ProfileNav-item--tweets .ProfileNav-value')
.first()
.text()
.attr('data-count')
)
const followingCount = toNumber(
$nav
.find('.ProfileNav-item--following .ProfileNav-value')
.first()
.text()
.attr('data-count')
)
const followerCount = toNumber(
$nav
.find('.ProfileNav-item--followers .ProfileNav-value')
.first()
.text()
.attr('data-count')
)
const likeCount = toNumber(
$nav
.find('.ProfileNav-item--favorites .ProfileNav-value')
.first()
.text()
.attr('data-count')
)

const userMentions = parseUsernamesFromText(bio)
Expand Down

0 comments on commit 00dda31

Please sign in to comment.