HTMLRewriter is a streaming web content rewriter. This example demonstrates how to use it to scrape content from a target webpage.

Scraping the 'New & Upcoming In Theaters' movies from Rotten Tomatoes and displaying them below.

Index Title Rating
1 undefined 92%
2 KPop Demon Hunters 99%
3 undefined 82%
4 F1 The Movie 97%
5 undefined 97%
6 Sinners 96%
7 undefined 91%
8 Zootopia 2 96%
9 undefined 85%
10 Frankenstein 94%
11 undefined 97%
12 Sentimental Value 94%
13 undefined 86%
14 Hamnet 93%
15 undefined 95%
16 Train Dreams 90%
17 undefined 83%
18 Elio 89%
19 undefined 97%
20 Little Amélie or the Character of Rain 90%
21 undefined 93%
22 Arco 88%
23 undefined 94%
24 One Battle After Another 85%
25 undefined 88%
26 Bugonia 84%
27 undefined 98%
28 The Secret Agent 83%
29 undefined 93%
30 Marty Supreme 82%