HF RL Explorer

Task: Delete a div with a specific class using BeautifulSoup

Task: Delete a div with a specific class using BeautifulSoup: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that uses BeautifulSoup to remove (delete) all <div elements with a specific class from an HTML document. The script should read an HTML file, remove all <div elements…

The task

Write a Python script that uses BeautifulSoup to remove (delete) all `<div>` elements with a specific class from an HTML document. The script should read an HTML file, remove all `<div>` elements that have the class `unwanted-content`, and write the modified HTML to an output file.

Part of PrimeIntellect/Terminal-Lego-15k.