from selenium import webdriver


def main():
    driver = webdriver.Chrome()
    driver.get('http://127.0.0.1:8000/places/default/search')
    driver.find_element_by_id('search_term').send_keys('.')
    driver.execute_script("document.getElementById('page_size').options[1].text = '1000'")
    driver.find_element_by_id('search').click()
    driver.implicitly_wait(30)
    links = driver.find_elements_by_css_selector('#results a')
    countries = [link.text for link in links]
    driver.close()
    print countries


if __name__ == '__main__':
    main()

from selenium import webdriver


def main():
    driver = webdriver.Chrome()
    driver.get('http://127.0.0.1:8000/places/default/search')
    driver.find_element_by_id('search_term').send_keys('.')
    driver.execute_script("document.getElementById('page_size').options[1].text = '1000'")
    driver.find_element_by_id('search').click()
    driver.implicitly_wait(30)
    links = driver.find_elements_by_css_selector('#results a')
    countries = [link.text for link in links]
    driver.close()
    print countries


if __name__ == '__main__':
    main()
