raashidsalih/AgMarkNet-Scraper ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python tool that pulls agricultural market data from Agmarknet and saves it into a Postgres database.

I want to be able to run it from the command line with a commodity name, one or more states, a start date, an end date, and an optional time grouping like daily, monthly, or yearly. It should handle names with spaces, like Tamil Nadu or chili red, and it should work reliably even when the site is slow or flaky, so use the most direct and stable way to get the results instead of clicking around the site if possible.

Please organize it cleanly so the scraping logic, data handling, and any display or helper code are separated in a simple way. It should read database settings from an environment file, and if useful, include a sample env file and clear setup instructions. Make sure the output matches the market data fields like state, district, market, commodity, variety, group, arrival, prices, and date. If you need current details about the site or browser setup, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab