import re
from urllib.parse import urlparse, urlencode
from urllib.request import urlopen

def get_search_results(input):
    """
    Takes search input and returns the list of URL's for that search,
    generated by YouTube.
    """
    query_string = urlencode({'search_query': input})
    html_content = urlopen('https://www.youtube.com/results?' +
                           query_string)
    search_results = re.findall(r'href=\"\/watch\?v=(.{11})',
                                html_content.read().decode())
    return search_results
