async function searchHTMLContent(page, regex) {
    let res = (await page.content()).search(regex);
    if (res == -1) {
        console.log('ps5 in stock!')
        return true
    }
    else {
        return false
    }

}
/**
 * called after the page is finished loading. Searches the HTML content of a page
 * for the given regex pattern. Returns true if it doesn't find the regex pattern that occurs
 * on the out of stock page.
 * 
 * @param {puppet.Page} page the page to search
 * @param {RegExp} regex pattern to search for
 * @returns {boolean}
 */
called after the page is finished loading. Searches the HTML content of a page
for the given regex pattern. Returns true if it doesn't find the regex pattern that occurs
on the out of stock page.

@param {puppet.Page} page the page to search
@param {RegExp} regex pattern to search for
@returns {boolean}
called after the page is finished loading . Searches the HTML content of a page for the given regex pattern . Returns true if it doesn ' t find the regex pattern that occurs on the out of stock page . @param { puppet . Page } page the page to search @param { RegExp } regex pattern to search for @returns { boolean }
async function searchHTMLContent(page, regex) {
    let res = (await page.content()).search(regex);
    if (res == -1) {
        console.log('ps5 in stock!')
        return true
    }
    else {
        return false
    }
}
async function searchHTMLContent ( page , regex ) { let res = ( await page . content ( ) ) . search ( regex ) ; if ( res == - 1 ) { console . log ( 'ps5 in stock!' ) return true } else { return false } }
called after the page is finished loading.
called after the page is finished loading .