Skip to content

Commit

Permalink
Merge pull request #70 from the-markup/fix-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bachdumpling authored Aug 18, 2023
2 parents 5dda0ee + 620d324 commit 86d7f74
Show file tree
Hide file tree
Showing 6 changed files with 3,530 additions and 451 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ build
**/*/*.html
**/*/*.jpeg
**/*/*.zip
!__tests__/test-data/britishmuseum/*
!__tests__/test-data/canvas-fingerprinting/*
!__tests__/test-data/collector/*
!__tests__/test-data/fingerprintjs/*
!__tests__/test-data/propublica.org-no-browser-cookies/*
!__tests__/test-data/propublica.org/*
!__tests__/test-data/kohls-new.com/*
!__tests__/test-data/veteransunited/*
!__tests__/test-data/veteransunitedsession/*
!__tests__/test-data/veteransunited-1.0.3/*
!__tests__/test-pages/*
!__tests__/test-pages/js-instrument/*
12 changes: 6 additions & 6 deletions example.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { KnownDevices } from "puppeteer";
import { CollectorOptions, collect } from "./src";
import { KnownDevices } from 'puppeteer';
import { CollectorOptions, collect } from './src';
import { join } from 'path';

(async () => {
const URL = 'example.com';
const URL = process.argv.length > 2 ? process.argv[2] : 'example.com';
const EMULATE_DEVICE = 'iPhone 13 Mini';

const config: CollectorOptions = {
numPages: 3,
numPages: 1,
headless: false,
emulateDevice: KnownDevices[EMULATE_DEVICE],
// Uncomment to run with desktop/laptop browser
// emulateDevice: {
// viewport: {height: 1440, width: 800},
// viewport: {height: 1440, width: 800},
// userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
// },
outDir: join(__dirname, 'demo-dir'),
outDir: join(__dirname, 'demo-dir')
};

console.log(`Beginning scan of ${URL}`);
Expand Down
Loading

0 comments on commit 86d7f74

Please sign in to comment.