CertKeen

Databricks Generative AI Engineer Associate · Free practice question 3 of 12

Parsing HTML help pages

Dunmere Rail scraped its public timetable help pages as HTML. Navigation menus, cookie banners and footers appear in every page. Which Python package is most suitable for parsing the HTML and keeping only the main article text?

  1. A.python-pptx
  2. B.pytesseract
  3. C.BeautifulSoup
  4. D.NumPy
Show answer and explanation

Correct answer: C. BeautifulSoup

Why: BeautifulSoup parses HTML so specific elements, such as navigation, banners and footers, can be removed and the main content extracted. python-pptx reads PowerPoint files, pytesseract performs OCR on images, and NumPy is a numerical array library.

More free Databricks Generative AI Engineer Associate questions