diff --git a/minet/scrape/classes/named/europresse.py b/minet/scrape/classes/named/europresse.py index 847a9dff2b..500ece9b3f 100644 --- a/minet/scrape/classes/named/europresse.py +++ b/minet/scrape/classes/named/europresse.py @@ -7,11 +7,11 @@ from .types import NamedScraper -warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning) - def extract_content(content): - return BeautifulSoup(unescape(content), "html.parser").get_text().strip() + with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=MarkupResemblesLocatorWarning) + return BeautifulSoup(unescape(content), "html.parser").get_text().strip() def extract_date(doc_id):