def get_soup ( page = '' ) : content = requests . get ( '%s/%s' % ( BASE_URL , page ) ) . text return BeautifulSoup ( content )
how to fetch the contents of a webpage using requests in python
Returns a bs4 object of the page requested
def get_soup(page=''):
    """
    Returns a bs4 object of the page requested
    """
    content = requests.get('%s/%s' % (BASE_URL, page)).text
    return BeautifulSoup(content)