import webbrowser


def get_info_from_website (barcode):
    """Opens a website containing the nutrition info of the scanned barcode in a new tab
    
    For this, I imported and used the webbrowser.open package to open a url in a new window.
    Details at: https://docs.python.org/3/library/webbrowser.html
    
    Parameters
    ----------
    barcode: the barcode for which the nutrition info should be obtained
     
    Returns
    -------
    nutrition_info_page: a website containing the nutrition info of the scanned food item.
    """ 
    # Use webbrowser.open to open the website and use the previously acquired barcode
    # to pull nutritional data on the scanned barcode
    nutrition_info_page = webbrowser.open(f"https://world.openfoodfacts.org/product/{barcode}", new=1)
    return nutrition_info_page