web_programming.fetch_well_rx_price

Scrape the price and pharmacy name for a prescription drug from rx site after providing the drug name and zipcode.

Attributes

BASE_URL

drug_name

Functions

fetch_pharmacy_and_price_list(→ list | None)

[summary]

Module Contents

web_programming.fetch_well_rx_price.fetch_pharmacy_and_price_list(drug_name: str, zip_code: str) list | None

[summary]

This function will take input of drug name and zipcode, then request to the BASE_URL site. Get the page data and scrape it to the generate the list of lowest prices for the prescription drug.

Args:

drug_name (str): [Drug name] zip_code(str): [Zip code]

Returns:

list: [List of pharmacy name and price]

>>> fetch_pharmacy_and_price_list(None, None)
>>> fetch_pharmacy_and_price_list(None, 30303)
>>> fetch_pharmacy_and_price_list("eliquis", None)
web_programming.fetch_well_rx_price.BASE_URL = 'https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true'
web_programming.fetch_well_rx_price.drug_name