Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Commit

Permalink
new error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
99littlebugs committed Jan 17, 2021
1 parent 0a30b77 commit 94db0e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ const nyGovSites = [{
const page = await browser.newPage();
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75');
await page.goto(site.link, {timeout: 10000});
await page.waitForSelector("#pagetitle, h1", { timeout: 10000 });
const isError = await page.$("h1");
await page.waitForSelector("#pagetitle, h1, #notfound", { timeout: 10000 });
const isError = await page.$("h1, #notfound");
if (!isError) {
site.events = await page.evaluate(() => {
const events = [];
Expand Down

0 comments on commit 94db0e3

Please sign in to comment.