From fcdc5afbf40ae52c07fa994d5c012efea1bf01c8 Mon Sep 17 00:00:00 2001 From: freamon Date: Sat, 16 Mar 2024 20:39:16 +0000 Subject: [PATCH] Ignore spurious warning from BeautifulSoup --- app/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/utils.py b/app/utils.py index ea34351b..47feb13c 100644 --- a/app/utils.py +++ b/app/utils.py @@ -13,7 +13,9 @@ import math from urllib.parse import urlparse, parse_qs, urlencode from functools import wraps import flask -from bs4 import BeautifulSoup, NavigableString +from bs4 import BeautifulSoup, NavigableString, MarkupResemblesLocatorWarning +import warnings +warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning) import requests import os from flask import current_app, json, redirect, url_for, request, make_response, Response, g