~/talk

'Write a Scraper as a State Machine with Playwright and Kafka'

Talkat XtremeJS 2022 · on Tuesday, 2022-12-13· [testing, distributed-systems]
slides:none on file

A Glassdoor scraper written in TypeScript runs on Node.js and uses Playwright for browser automation, XState to model the scraper as a state machine with guarded transitions, parallel states for concurrent profile scraping and resume downloads, and Kafka to decouple job producers and success/failure topics. It logs in with provided credentials, navigates pages, waits for network events, and saves downloadable resumes as Node readable streams (download can return null). Machine logic is unit and integration tested; promise-based invokes update context and publish results to Kafka.

AI-written summary · about

  1. 0:00Intro
  2. 0:29Establishing expectations
  3. 1:34Playwright vs Puppeteer
  4. 7:17What is XState?
  5. 9:23XState: Example (1/2)
  6. 10:34XState: States
  7. 11:21XState: Events
  8. 11:50XState: Context
  9. 12:50XState: Actions
  10. 15:47Kafka: Example architecture
  11. 16:58What is Apache Kafka?
  12. 20:48Takeaways
  13. 22:26Additional material
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.