2.4.0 • Published 3 years ago

page-request-emitter v2.4.0

Weekly downloads
57
License
MIT
Repository
github
Last release
3 years ago

About

It hooks requests from a puppeteer page and emits as Observable.

Usage

You can see the complete example at test/index.spec.ts.

const browser = puppeteer.launch();
const html = `
<script>
fetch("http://domain.com", "A").then(()=>{
    fetch("http://not-domain.com", "B")
}).then(()=>{
    fetch("http://domain.com", "C")
})
</script>`
streamPageEvents(browser, "http://domain.com", html, async (page:puppeteer.Browser, req:puppeteer.Request) => req.postData()).subscribe({
    next: console.log
})

// output
// A
// C
2.4.0

3 years ago

2.3.0

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago