Skip to content

Commit

Permalink
fix position roles bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardiwagner committed May 2, 2020
1 parent 9ac9f59 commit 9e0cf53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions src/profile/contactInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ const getContactInfo = async(page) => {
})

const element = await page.$(SEE_MORE_SELECTOR)
await element.click()
await new Promise((resolve) => { setTimeout(() => { resolve() }, 500)})

const contactInfo = await scrapSection(page, template)
const closeButton = await page.$(CLOSE_MODAL_SELECTOR)
if(closeButton)
await closeButton.click()
if(element){
await element.click()
await new Promise((resolve) => { setTimeout(() => { resolve() }, 500)})

const contactInfo = await scrapSection(page, template)
const closeButton = await page.$(CLOSE_MODAL_SELECTOR)
if(closeButton)
await closeButton.click()

return contactInfo
return contactInfo
}

}

module.exports = getContactInfo
2 changes: 1 addition & 1 deletion src/profile/profileScraperTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
}
},
positions: {
selector: 'section[id=experience-section] li',
selector: 'section[id=experience-section] li.pv-profile-section__list-item',
fields: {
title: 'h3',
link: {
Expand Down

0 comments on commit 9e0cf53

Please sign in to comment.