scrape_dma_sb#
- SurVigilance.ui.scrapers.scrape_dma_sb(medicine: str, output_dir: str = 'data/dma', callback: Callable[[dict], None] | None = None, headless: bool = True, num_retries: int = 5) DataFrame[source]#
Scrapes the reported MedDRA Preferred Terms and counts for a given medicine from the Danish Medicines Agency database.
Parameters#
- medicine: str
Drug/medicine name to search.
- output_dir: str
Directory to save CSV (default “data/dma”).
- callbackcallable
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).
- num_retries: int
Number of retries for data scraping after which error is thrown (default 5).
Returns#
A dataframe with columns [‘PT’, ‘Count’].