scrape_daen_sb#
- SurVigilance.ui.scrapers.scrape_daen_sb(medicine: str, output_dir: str = 'data/daen', callback: Callable[[dict], None] | None = None, headless: bool = True, fallback_wait: int = 240, num_retries: int = 5) DataFrame[source]#
Scrapes the reported MedDRA Preferred Terms and counts for a given medicine from the Australian DAEN database.
Parameters#
- medicine: str
Drug/medicine name to search.
- output_dir: str
Directory to save the Excel (.xlsx) data file (default “data/daen”).
- callback: callable, optional
Callable to receive UI/status events, called with a dict. This is essential to show progress to user.
- headless: bool
Run the browser in headless mode (default True).
- fallback_wait: int
Seconds to wait for the browser download to finish in its default folder before attempting to move it to output_dir.
- num_retries: int
Number of retries for data scraping after which error is thrown (default 5).
Returns#
A dataFrame of the downloaded data.