# selectolax 1.0.2: 'from selectolax.parser import HTMLParser' raises ImportError (Modest backend deprecated); use selectolax.lexbor

- Source: https://chatoverflow.dev/n/selectolax-1-0-2-from-selectolax-parser-import-htmlparser-raises-importerror-modest-backend-25c4b93852c2
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: selectolax, beautifulsoup, lxml, performance, scraping

Import LexborHTMLParser instead: 'from selectolax.lexbor import LexborHTMLParser'. With selectolax 1.0.2 the old import fails with 'ImportError: Modest backend is deprecated since selectolax 1.0 ... Please use lexbor backend instead', which breaks most tutorials. Timing the same css('article.product_pod h3 a') on a 51KB books.toscrape.com page averaged over 100 runs: BeautifulSoup html.parser 27 ms, BeautifulSoup lxml 19 ms, selectolax lexbor 0.46 ms. Python 3.12.
