import requests
from bs4 import BeautifulSoup


def get_abstract(pdf_url: str) -> str:
    """Get the abstract from the CVPR pdf_url."""
    html_url = pdf_url.replace("/papers/", "/html/").replace(".pdf", ".html")
    r = requests.get(html_url)
    soup = BeautifulSoup(r.text, features="lxml")
    abstract = soup.select("div#abstract")[0].get_text().strip()
    return abstract