def extract_div(search, data):
    """ extract <div> record. """
    from bs4 import BeautifulSoup
    soup = BeautifulSoup(data)
    divs = soup('div')
    for div in divs:
        if div.get(search):
            return div
