DISCLAIMER: I do not know JS, it is an assignment for my work.
I have been asked to withdraw scrape some data from a Google Marketing page using Chrome Console.
The HTML code I need to scrape looks like this:
I made the following code where I created a dictionary and then used document.Selector()
to take the data but I only take it from one row.
var IntegrationDetails = [{}]
IntegrationDetails[0]["Property Name"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Advertiser"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Tracking ID"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Account"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Organisation name"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Integrations with reporting data"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Integrations with Cost Data"] = document.querySelector("JSPath").innerText
IntegrationDetails[0]["Integrations with Remarketing Lists"] = document.querySelector("JSPath").innerText
copy(IntegrationDetails)
I do not know how to iterate over every row in the mat-tab element and append each row to the dictionary.