i am using javascript puppeteer to scrap my github followings page. specifically i am trying to get a handle with unfollow button in this page. the problem is that inspect panel of browser shows a form and input tag for this section but in scrapped code there is nothing. this is my code:
const test=async()=>{
let btnHdl
let url2='https://github.com/nariman?tab=following'
await browserInit()
await page.goto(url2,{timeout:0})
let result=await page.evaluate(async ()=>{
let rows=document.querySelectorAll('.table-fixed')
let x=Array.from(rows).map(row=>{
let name1= row.children[1].children[0].children[0].innerHTML
let name2= row.children[1].children[0].children[1].innerHTML
if ((name1=='Sample Name') || (name2=='Sample Name')){
//this should be a handle to my target but it is not!
btnHdl=row.children[2].children[0].children[0]
}
})
return (btnHdl.innerHTML)
})
console.log(result);
await browser.close()
}
i know that it might be a javascript client side code that create this tags. so is there any solution ?
1