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 | 81% |
2 | Untamed | 71% |
3 | undefined | 81% |
4 | Too Much | 59% |
5 | undefined | 87% |
6 | Dept. Q | 90% |
7 | undefined | 83% |
8 | Superman | 91% |
9 | undefined | 86% |
10 | Squid Game | 66% |
11 | undefined | 94% |
12 | Sovereign | 78% |
13 | undefined | 100% |
14 | Sneaky Pete | 88% |
15 | undefined | 21% |
16 | Smurfs | 65% |
17 | undefined | 97% |
18 | Sinners | 96% |
19 | undefined | 79% |
20 | The Sandman | 78% |
21 | undefined | 51% |
22 | Jurassic World Rebirth | 71% |
23 | undefined | 77% |
24 | Ironheart | 47% |
25 | undefined | 36% |
26 | I Know What You Did Last Summer | 68% |
27 | undefined | 87% |
28 | Foundation | 71% |
29 | undefined | 86% |
30 | The Fantastic Four: First Steps | 92% |
31 | undefined | 67% |
32 | Eddington | 64% |
33 | undefined | 89% |
34 | Dexter: Resurrection | 83% |
35 | undefined | 100% |
36 | Ballard | 78% |
37 | undefined | 88% |
38 | 28 Years Later | 63% |