Design a python program to extract URLs from a website.
url = 'http://example.com'
from bs4 import BeautifulSoup
import requests

page = requests.get(url)
soup = BeautifulSoup(page.content, 'html.parser')
links = soup.select('a[href]')
for link in links:
    print(link['href'])