import requests
from bs4 import BeautifulSoup


def getLinks(url):
    """
    Receive a URL and return a BeautifulSoup object
    """
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36"}
    try:
        html = requests.get(url, headers=headers)
    except:
        print("Get links error!")
        return
    soup = BeautifulSoup(html.text, "lxml")
    return soup