download_vaers_zip_sb

download_vaers_zip_sb#

SurVigilance.ui.scrapers.download_vaers_zip_sb(year: int, download_dir: str = 'data/vaers', timeout: int = 600, callback: Callable[[dict], None] | None = None, headless: bool = True, fallback_wait: int = 120) str[source]#

Navigate the VAERS intermediate page, solve CAPTCHA, and download the ZIP.

Parameters#

year: int

Year of the VAERS data

download_dir: str

Directory to save the ZIP (default “data/vaers”)

timeout: int

Max seconds for the file download request (default 600s or 10 mins).

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: Seconds to wait for a browser-initiated download to

complete in browser default folder if the “Download File” button isn’t found in time.

Returns#

The full path of the downloaded ZIP file.