31
32 _HAS_NLTK = True
33▶except ImportError:
34 _HAS_NLTK = False
35
· · ·
39
40 _HAS_BS4 = True
41▶except ImportError:
42 _HAS_BS4 = False
43
· · ·
46
47 _HAS_LXML = True
48▶except ImportError:
49 _HAS_LXML = False
50
· · ·
256
257 Raises:
258▶ ImportError: If BeautifulSoup is not installed.
259 """
260 if not _HAS_BS4:
· · ·
262 "Unable to import BeautifulSoup. Please install via `pip install bs4`."
263 )
264▶ raise ImportError(msg)
265
266 soup = BeautifulSoup(html_content, "html.parser")
+ 10 more matches in this file