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 | 93% |
2 | The Studio | 75% |
3 | undefined | 95% |
4 | The Penguin | 85% |
5 | undefined | 95% |
6 | The Pitt | 86% |
7 | undefined | 98% |
8 | Adolescence | 74% |
9 | undefined | 94% |
10 | Severance | 73% |
11 | undefined | 98% |
12 | Hacks | 68% |
13 | undefined | 100% |
14 | Somebody Somewhere | 93% |
15 | undefined | 100% |
16 | The Traitors | 71% |
17 | undefined | 100% |
18 | Arcane: League of Legends | 80% |
19 | undefined | |
20 | Last Week Tonight With John Oliver | |
21 | undefined | 95% |
22 | Rebel Ridge | 73% |