Kate Winslet and Ellen Kuras’ Film Dominates UK Box Office A Breakthrough for the Newly Revealed …
"Kate Winslet’s ‘Lee’ Movie Unseats ‘Ferrari’ as Sky’s Top Original at UK Box Office"
+++++ a_workflow/1_ExtractFromText.py
from bs4 import BeautifulSoup
from bs4.element import Comment
text = """
EXCLUSIVE: Kate Winslet movie Lee has unseated Ferrari as Sky‘s biggest original movie at the UK box office.
Ellen Kuras’ biopic of American photographer Lee Miller has taken £4.3M ($5.6M) since opening in theaters on September 13 in more than 600 locations across the UK and Ireland, according to Sky, which launches the movie on the small screen tomorrow.
The movie has attracted positive reviews and been paired with a splashy Sky marketing campaign. It stars Winslet as Miller alongside the likes of Marion Cotillard, Andrea Riseborough and Andy Samberg, following the protagonist from her career as a model to enlisting as a photographer to chronicle the events of World War II for Vogue magazine as told to an interviewer in 1977. The movie also generated headlines after Winslet revealed how a crew member suggested she sit up straighter to hide her “belly rolls” during filming. “Not on your life! It was deliberate, you know?” she told Harper’s Bazaar UK over the summer.
"""
def extract_title_from_text(text):
try:
soup = BeautifulSoup(text, ‘html.parser’)
elements = [element for element in soup.stripped_strings]
paragraph = elements[0]
link = paragraph.split(‘
‘)[1].split(‘ ‘)[0]
title = link.replace(‘/’, ”).replace(‘-‘, ”).strip().capitalize()
return title
except Exception as e:
print(f"Error extracting title: {e}")
return None
EXCLUSIVE: Kate Winslet movie Lee has unseated Ferrari as Sky‘s biggest original movie at the UK box office.
Ellen Kuras’ biopic of American photographer Lee Miller has taken £4.3M ($5.6M) since opening in theaters on September 13 in more than 600 locations across the UK and Ireland, according to Sky, which launches the movie on the small screen tomorrow.
The movie has attracted positive reviews and been paired with a splashy Sky marketing campaign. It stars Winslet as Miller alongside the likes of Marion Cotillard, Andrea Riseborough and Andy Samberg, following the protagonist from her career as a model to enlisting as a photographer to chronicle the events of World War II for Vogue magazine as told to an interviewer in 1977. The movie also generated headlines after Winslet revealed how a crew member suggested she sit up straighter to hide her “belly rolls” during filming. “Not on your life! It was deliberate, you know?” she told Harper’s Bazaar UK over the summer.
print(extract_title_from_text(text))
