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 | 78% |
2 | Squid Game | 50% |
3 | undefined | 86% |
4 | Ironheart | 51% |
5 | undefined | 75% |
6 | Sirens | 60% |
7 | undefined | 80% |
8 | Stick | 61% |
9 | undefined | 88% |
10 | 28 Years Later | 63% |
11 | undefined | 63% |
12 | The Waterfront | 69% |
13 | undefined | 63% |
14 | We Were Liars | 62% |
15 | undefined | 80% |
16 | Materialists | 67% |
17 | undefined | 100% |
18 | The Survivors | 71% |
19 | undefined | 100% |
20 | Secrets We Keep | 76% |
21 | undefined | 96% |
22 | Murderbot | 79% |
23 | undefined | 89% |
24 | Deep Cover | 79% |
25 | undefined | 92% |
26 | Final Destination Bloodlines | 87% |
27 | undefined | 82% |
28 | The Life of Chuck | 88% |
29 | undefined | 87% |
30 | Dept. Q | 90% |
31 | undefined | 82% |
32 | Elio | 91% |
33 | undefined | 76% |
34 | Ballerina | 92% |
35 | undefined | 97% |
36 | Sinners | 96% |
37 | undefined | 83% |
38 | F1 The Movie | 97% |
39 | undefined | 77% |
40 | How to Train Your Dragon | 97% |