Abid Ali Awan writes that a Jupyter Notebook pipeline can turn a webpage into a lightweight LLM-powered QA engine by fetching HTML with requests, stripping noisy elements with BeautifulSoup, converting the cleaned DOM to Markdown with markdownify and ftfy, then asking an OpenAI model to answer a specific user query using only the compact Markdown, which reduces token use by removing navigation, scripts and repeated marketing text.
- Uses gpt-5.4-nano for cost-efficient answers
- Removes script, style, nav, header, footer, form, button tags and class/id names containing popup, cookie, navbar, modal, etc.
- Demonstrates queries on olostep.com home and pricing pages and saves output to ai_scraper_result.md
- Notes running costs and cites commercial alternatives such as Olostep, Firecrawl and Exa