{"id":13451878,"url":"https://github.com/slightlyoff/tourist","last_synced_at":"2026-02-22T19:39:34.424Z","repository":{"id":54669929,"uuid":"187679277","full_name":"slightlyoff/tourist","owner":"slightlyoff","description":"Travel the web they said, it'll be fun they said.","archived":false,"fork":false,"pushed_at":"2019-05-21T01:58:17.000Z","size":13,"stargazers_count":58,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T18:52:40.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slightlyoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-20T16:45:26.000Z","updated_at":"2024-01-04T15:51:26.000Z","dependencies_parsed_at":"2022-08-13T23:20:53.127Z","dependency_job_id":null,"html_url":"https://github.com/slightlyoff/tourist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slightlyoff%2Ftourist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slightlyoff%2Ftourist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slightlyoff%2Ftourist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slightlyoff%2Ftourist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slightlyoff","download_url":"https://codeload.github.com/slightlyoff/tourist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245158729,"owners_count":20570237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:05.526Z","updated_at":"2026-02-22T19:39:34.381Z","avatar_url":"https://github.com/slightlyoff.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# tourist\n\nTravel the web they said, it'll be fun they said.\n\n\u003e Tourist uses Puppeteer to run [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) Chrome to take screenshots and traces of websites for very basic, high-level analysis. It computes a [Web Bloat Score](https://www.webbloatscore.com/) relative to a specified viewport (mobile by default) and outputs \"first clues\" for performance investigation to stdout.\n\n## Getting Started\n\nTourist takes either a single url to crawl:\n\n```bash\nnode tourist.js --url=\"https://infrequently.org\"\n```\n\nOr a file containing a single JSON array of URLs to crawl:\n\n```bash\nnode tourist.js --urls-file=urls.json\n```\n\nTourist then starts headless Chrome, loads the URL(s), takes screenshots of them, and saves a [Chrome Trace](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which can be loaded in either `chrome:tracing` or Chrome Devtools for further inspection.\n\nOutput is dropped into an output directory (by default, `./out/`), which can be changed with `--out`, e.g.:\n\n```bash\nnode tourist.js --out=/tmp/out/ --url=\"https://infrequently.org\"\n```\n\nBy default, Tourist prints high-level analysis info for each URL,\n\n```\n\u003e node tourist.js --out=/tmp/out/ --url=\"https://infrequently.org\"\nℹ Crawling: https://infrequently.org\n✔ https://infrequently.org\nℹ Analysing trace\nℹ\n  \u003e    Total size: 435.1 KiB (684.4 KiB uncompressed)\n  \u003e            JS: 72 KiB (16.54%)\n  \u003e    Largest JS: 27.9 KiB (6.40%)\n  \u003e                https://platform.twitter.com/widgets.js\n  \u003e           CSS: 62.9 KiB (14.46%)\n  \u003e   Largest CSS: 54.5 KiB (12.52%)\n  \u003e                https://platform.twitter.com/css/tweet.a28c81a0749466df66438c06af00639d.light.ltr.css\n  \u003e         Image: 165 KiB (37.93%)\n  \u003e Largest Image: 159.5 KiB (36.64%)\n  \u003e                https://infrequently.org/wp-content/uploads/2018/09/http_archive_js_bytes_chart-1-768x393.png\n\nℹ \u003e Web Bloat Score (AFT): 2.47, Full page: 0.06\n```\n\nAdditionally, Tourist generates a directory structure that includes screenshots of the pages above-the-fold (\"AFT\") content as well as the full page in PNG format.\n\n```\nslightlyoff:~ \u003e cd /tmp/out\nslightlyoff:/tmp/out \u003e find .\n.\n./infrequently.org\n./infrequently.org/iphone_6_7_8\n./infrequently.org/iphone_6_7_8/screenshot.png\n./infrequently.org/trace.json\n./infrequently.org/screenshot.full.png\n./infrequently.org/screenshot.aft.png\n```\n\nScreenshots are taken for each of the specified viewports (which include dimensions as well as DPR). By default, only a single viewport is used. Viewports are selected from an included list of popular mobile devices (`./viewports.json`), sorted by frequency.\n\nTourist can obtain a fuller list of screenshots though `--viewports-limit`, e.g.:\n\n```bash\nnode tourist.js --viewports-limit=10 --out=/tmp/out/ --url=\"https://infrequently.org\"\n```\n\n```\nslightlyoff:/tmp/out \u003e find .\n.\n./infrequently.org\n./infrequently.org/iphone_6_7_8\n./infrequently.org/iphone_6_7_8/screenshot.png\n./infrequently.org/trace.json\n./infrequently.org/galaxy_j2\n./infrequently.org/galaxy_j2/screenshot.png\n./infrequently.org/galaxy_j5\n./infrequently.org/galaxy_j5/screenshot.png\n./infrequently.org/xperia_xz1\n./infrequently.org/xperia_xz1/screenshot.png\n./infrequently.org/redmi_note_4\n./infrequently.org/redmi_note_4/screenshot.png\n./infrequently.org/galaxy_s8\n./infrequently.org/galaxy_s8/screenshot.png\n./infrequently.org/screenshot.full.png\n./infrequently.org/screenshot.aft.png\n```\n\nAn optional (single) desktop form-factor is built-in too, for those not yet living in the new global mobile-first (if not mobile-only) reality:\n\n```bash\nnode tourist.js --desktop --out=/tmp/out/ --url=\"https://infrequently.org\"\n```\n\noutputs...\n\n```\nℹ Crawling: https://infrequently.org\n✔ https://infrequently.org\nℹ Analysing trace\nℹ\n  \u003e    Total size: 304.9 KiB (554.8 KiB uncompressed)\n  \u003e            JS: 71.9 KiB (23.59%)\n  \u003e    Largest JS: 27.9 KiB (9.14%)\n  \u003e                https://platform.twitter.com/widgets.js\n  \u003e           CSS: 62.9 KiB (20.64%)\n  \u003e   Largest CSS: 54.5 KiB (17.87%)\n  \u003e                https://platform.twitter.com/css/tweet.a28c81a0749466df66438c06af00639d.light.ltr.css\n  \u003e         Image: 34.5 KiB (11.32%)\n  \u003e Largest Image: 29.7 KiB (9.73%)\n  \u003e                https://infrequently.org/wp-content/uploads/2018/09/http_archive_js_bytes_chart-1-300x154.png\n\nℹ \u003e Web Bloat Score (AFT): 1.56, Full page: 0.08\n```\n\n```\nslightlyoff:~ \u003e cd /tmp/out\nslightlyoff:/tmp/out \u003e find .\n.\n./infrequently.org\n./infrequently.org/trace.json\n./infrequently.org/desktop\n./infrequently.org/desktop/screenshot.png\n./infrequently.org/screenshot.full.png\n./infrequently.org/screenshot.aft.png\n```\n\n## Large Crawls\n\nTourist is currently a sequential, single-process system. This is likely to change! It currently crawls sites one-at-a-time which, given the overhead inherent in running a full browser instance and dumping/analysing full traces, can take some time.\n\nOccasionally in large crawls, Chrome can crash and Tourist will fail. To recover from these situations and restart the crawl from (roughly) where one left off, use `--continue`:\n\n```\nnode tourist.js --out=/tmp/out/ --urls-file=./urls.json\n\n...things happen, including crawl failure...\n\nnode tourist.js --out=/tmp/out/ --urls-file=./urls.json --continue\n```\n\nContinuation looks for the presence of trace and top-level screenshot files in the output directory to decide which urls to re-crawl.\n\n## Analysis Only\n\nLets say you've previously cralwed a large set of urls and only want to re-run the analysis (rather than, e.g., change the form-factor against which you are computing WebBS or taking new screenshots). Use `--no-crawl` to trigger this mode. Note that you'll still need to provide the URL(s) to analyse:\n\n```\nslightlyoff:/projects/tourist \u003e time (node tourist.js --no-crawl --urls-file=./urls.json)\n```\n\nThe system currently does not support a `--quiet` or non-interactive mode. Stay tuned.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslightlyoff%2Ftourist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslightlyoff%2Ftourist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslightlyoff%2Ftourist/lists"}