<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getWeb(url, isFeed):
 """Download url and parse it with lxml. If "isFeed" is True returns lxml.etree else, returns lxml.html """

    socket.setdefaulttimeout(300)
    loadedWeb = urllib2.build_opener()
    loadedWeb.addheaders = getHeaders()
    if isFeed:
        web = etree.parse(loadedWeb.open(url))
    else:
        web = html.parse(loadedWeb.open(url))
    return web