This project scrapes drug names from WebMD (letters a–z and 0) and saves the results to drugs_list.csv and drugs_list.json.
The scraper uses Selenium (Firefox / geckodriver) + BeautifulSoup and webdriver-manager to auto-manage drivers. This README shows how to install and run the project using uv (Astral) as the dependency & environment manager.
- Firefox browser installed.
- Internet connection (the scraper visits WebMD pages).
curlor PowerShell for theuvinstaller (optional).
- Install
uv(Astral) — the dependency manager. - Initialize or use a project with
uv. - Install dependencies:
selenium,beautifulsoup4,lxml,webdriver-manager. - Run the scraper script (
main.py) usinguv run. - Outputs are written to
drugs_list.csvanddrugs_list.jsonin the project root.
macOS / Linux (recommended):
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Verify:
uv --versionOpen a terminal in the project folder and follow these commands.
- Install dependencies:
uv sync- Activate venv:
# macOS / Linux
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1python main.pyAfter the run completes, the script saves:
drugs_list.csv— CSV with columns:Alphabet, Drug Name, Link.drugs_list.ndjson— JSON grouped by alphabet.