src/bto_sbf_webscraper/scraper.py
def scrape_link(driver, flat_link):
    """Scrapes the given HDB flat link

    Args:
        driver (webdriver): Selenium Webdriver
        flat_link (str): URL of the flat link that needs to be scraped

    Returns:
        list (dict): Returns list of dictionaries containing all the blocks and units in the flat link
    """
    block_links = get_block_links(driver, flat_link)
    final_data = []
    town = unquote(re.compile("Town=(.+?)&").findall(flat_link)[0])
    flat = unquote(re.compile("Flat=(.+?)&").findall(flat_link)[0])
    with click.progressbar(
        block_links,
        label=f"{town} - {flat} Room",
        show_pos=True,
        show_eta=False,
    ) as linkss:
        for link in linkss:
            data = process_block(driver, link)
            final_data = final_data + data

    return final_data
Scrapes the given HDB flat link

    Args:
        driver (webdriver): Selenium Webdriver
        flat_link (str): URL of the flat link that needs to be scraped

    Returns:
        list (dict): Returns list of dictionaries containing all the blocks and units in the flat link
    
Scrapes the given HDB flat link
Scrapes the given HDB flat link
def scrape_link(driver, flat_link):
    block_links = get_block_links(driver, flat_link)
    final_data = []
    town = unquote(re.compile("Town=(.+?)&").findall(flat_link)[0])
    flat = unquote(re.compile("Flat=(.+?)&").findall(flat_link)[0])
    with click.progressbar(
        block_links,
        label=f"{town} - {flat} Room",
        show_pos=True,
        show_eta=False,
    ) as linkss:
        for link in linkss:
            data = process_block(driver, link)
            final_data = final_data + data
    return final_data
def scrape_link ( driver , flat_link ) : block_links = get_block_links ( driver , flat_link ) final_data = [ ] town = unquote ( re . compile ( "Town=(.+?)&" ) . findall ( flat_link ) [ 0 ] ) flat = unquote ( re . compile ( "Flat=(.+?)&" ) . findall ( flat_link ) [ 0 ] ) with click . progressbar ( block_links , label = f"{town} - {flat} Room" , show_pos = True , show_eta = False , ) as linkss : for link in linkss : data = process_block ( driver , link ) final_data = final_data + data return final_data
Scrapes the given HDB flat link
Scrapes the given HDB flat link
"""Scrapes the given HDB flat link

    Args:
        driver (webdriver): Selenium Webdriver
        flat_link (str): URL of the flat link that needs to be scraped

    Returns:
        list (dict): Returns list of dictionaries containing all the blocks and units in the flat link
    """
list (dict): Returns list of dictionaries containing all the blocks and units in the flat link
list ( dict ) : Returns list of dictionaries containing all the blocks and units in the flat link
driver
None
flat_link
URL of the flat link that needs to be scraped
URL of the flat link that needs to be scraped