Read Web Pages With Haiku
Export
Summarizing Web Page Content with Claude 3 Haiku
In this recipe, we'll learn how to fetch the content of a web page given its URL and then use Anthropic's Claude API to generate a summary of the page's content.
Let's start by installing the Anthropic library.
Setup
First, let's install the necessary libraries and setup our Anthropic client with our API key.
[ ]
[6]
Step 1: Fetching the Web Page Content
First, we need to fetch the content of the web page using the provided URL. We'll use the requests library for this purpose.
[ ]
Step 2: Preparing the Input for Claude
Next, we'll prepare the input for the Claude API. We'll create a message that includes the page content and a prompt asking Claude to summarize it.
[11]
Step 3: Generating the Summary
Now, we'll call the Haiku to generate a summary of the web page content.
[12]
The 96th Academy Awards ceremony took place on March 10, 2024 at the Dolby Theatre in Los Angeles. The ceremony, hosted by Jimmy Kimmel, presented Academy Awards (Oscars) in 23 categories honoring films released in 2023. The big winner of the night was the film "Oppenheimer," which won a leading 7 awards including Best Picture, Best Director for Christopher Nolan, and several technical awards. Other major winners were "Poor Things" with 4 awards and "The Zone of Interest" with 2 awards. Several notable records and milestones were set, including Steven Spielberg receiving his 13th Best Picture nomination, and Billie Eilish and Finneas O'Connell becoming the youngest two-time Oscar winners. The ceremony featured musical performances, tributes to past winners, and a touching "In Memoriam" segment. However, it also faced some criticism, such as the distracting and hard-to-follow "In Memoriam" presentation and political controversy around a director's comments about the Israel-Gaza conflict.