Pupeeteer was updated so had to change a few of the selector's lines
This commit is contained in:
@ -8,7 +8,8 @@ const apiKey = "6hUfJdAartHTHhHc0WIRZYPWe"
|
||||
// Luminate Production ^
|
||||
const uid = "/\?uid\=7beg87y4-fh24-4929-3rt5-24kdn87s5241";
|
||||
const groupIds = [
|
||||
'd9278062-762c-40d1-bb12-bfd9a00eea99',
|
||||
'6c94e20c-aff7-465a-baaf-c32804fa7c9c',
|
||||
'fbadcf2b-db4a-4342-b1a7-15fc357e6443',
|
||||
]
|
||||
|
||||
const getAllGroups = async (num) => {
|
||||
@ -42,7 +43,9 @@ async function courseOverview(id, i, num) {
|
||||
timeout: 0 });
|
||||
|
||||
await page.title();
|
||||
const [getXpath] = await page.$x('/html/body/div[1]/div');
|
||||
// const [getXpath] = await page.$$('/html/body/div[1]/div');
|
||||
// The above line kept giving the error "not a valid selector"
|
||||
const [getXpath] = await page.$$('#course-mobile > div.np-card.cover-page-card > div > div > div.cover-page-card-title');
|
||||
const resourcetitle = await page.evaluate(name => name.innerText, getXpath);
|
||||
// console.log(resourcetitle)
|
||||
const resource = resourcetitle.trim();
|
||||
|
||||
Reference in New Issue
Block a user