def parse_neighborhood(link):
    driver1 = webdriver.Chrome(executable_path=driver_path)
    driver1.maximize_window()
    driver1.get(link)
    for i in range(8):
        driver1.execute_script('window.scrollTo(0, document.body.scrollHeight)')
        time.sleep(1)
        sel = driver1.page_source
        response1 = Selector(text=sel)
        for cards in response1.css('div.post-card-item.kt-col-6.kt-col-xxl-4'):
            link = cards.css('a').attrib['href']
            house_link = ('https://divar.ir' + link)
            parse_house(house_link)
            time.sleep(1)
    driver1.quit()
def parse_neighborhood(link):
    driver1 = webdriver.Chrome(executable_path=driver_path)
    driver1.maximize_window()
    driver1.get(link)
    for i in range(8):
        driver1.execute_script('window.scrollTo(0, document.body.scrollHeight)')
        time.sleep(1)
        sel = driver1.page_source
        response1 = Selector(text=sel)
        for cards in response1.css('div.post-card-item.kt-col-6.kt-col-xxl-4'):
            link = cards.css('a').attrib['href']
            house_link = ('https://divar.ir' + link)
            parse_house(house_link)
            time.sleep(1)
    driver1.quit()