Python Scraper to Excel (.xls)

Заказчик: AI | Опубликовано: 31.01.2026

I need a concise, well-commented Python script that can visit https://sansad.in/rs/questions/questions-and-answers, crawl through every page of results, and export the data to a single-sheet .xls workbook. Required columns • Ministry Name • Date • Member name • Session No • Question No • Answer Link (the full URL for the answer PDF or page) Please have the code automatically iterate through all available result pages so nothing is missed, then save everything in row order to one sheet named “Questions”. Pandas, BeautifulSoup, requests, xlwt, or Selenium are all fine as long as the final file is a standard .xls that opens in Excel without warnings. Deliverables 1. The .py file, clearly commented so I can modify the URL later if needed. 2. A sample .xls generated by the script, showing that every question currently on the site has been captured. 3. A quick README (just a few lines) explaining any required Python packages and the command I should run. I’ll test by running the script in a fresh virtual environment: if it finishes without errors and the workbook holds every row, the job is complete.