Q:

Beautifulsoup - scrape search results

I am new to Beautifulsoup and I am trying to learn how to scrape search results from websites. 
I've been able to practice on scraping websites, but I've reached a block with results from search forms. 
For example, I would like to find all the names, addresses of libraries located in NSW
How would I go about that? How can I retreive the results based on that search criteria, and open that results page with Beautifulsoup?
Thanks and sorry for my beginner question!
Xx 

A:

import requests
from bs4 import BeautifulSoup

library_list = []

data = {'action' : 'LibSearch', 'termtype' : 'Keyword', 'libstate' : 'NSW', 'dosearch' : 'Search', 'libtype' : 'All', 'chunk' : 20}

page = requests.get("http://www.nla.gov.au/apps/libraries/", params=data)
soup = BeautifulSoup(page.content, 'html.parser')

libraries = soup.find_all("a")

for library in libraries[5:]:
    print(library.text)
    library_list.append(library.text)

OUTPUT:
Design Centre Enmore Library
Sydney Institute

A.B. 'Banjo' Paterson Library
Sydney Grammar School
.
.

ANSTO Library
Australian Nuclear Science and Technology Organisation

.
.

Note: Change the chunk size in the data params to get as many
  libraries as you want.

