def steam_game_parser(code, link):
    soup = BeautifulSoup(code, 'html.parser')
    AllGameDetailsFormatted = ''
    titleDiv = soup.find('div', attrs={'class': 'apphub_AppName'})
    if titleDiv:
        gameTitle = titleDiv.string
        AllGameDetailsFormatted += ('*' + gameTitle)
        priceDiv = soup.find('div', attrs={'class': 'game_purchase_price price'})
        if priceDiv:
            gamePrice = priceDiv.string
            AllGameDetailsFormatted += (' - ' + gamePrice.strip())
        else:
            priceDiv = soup.find('div', attrs={'class': 'discount_final_price'})
            if priceDiv:
                gamePrice = priceDiv.string
                AllGameDetailsFormatted += (' - ' + gamePrice.strip())
                discountPercentageDiv = soup.find('div', attrs={'class': 'discount_pct'})
                if discountPercentageDiv:
                    percentageDiscountedBy = discountPercentageDiv.string
                    AllGameDetailsFormatted += ((' (at ' + percentageDiscountedBy.strip()) + ' off)')
        AllGameDetailsFormatted += '*\n'
    else:
        print(('Cannot parse title as div with class apphub_AppName from Steam page for ' + link))
    descriptionDiv = soup.find('div', attrs={'class': 'game_description_snippet'})
    if descriptionDiv:
        descriptionSnippet = descriptionDiv.string.replace('\r', '').replace('\n', '').replace('\t', '').replace('_', ' ')
        AllGameDetailsFormatted += (descriptionSnippet + '\n')
    if AllGameDetailsFormatted:
        AllGameDetailsFormatted += (link + '\n')
    dateSpan = soup.find('div', attrs={'class': 'date'})
    if dateSpan:
        releaseDate = dateSpan.string
        AllGameDetailsFormatted += (('Release Date: ' + releaseDate) + '\n')
    featureList = ''
    featureLinks = soup.findAll('a', attrs={'class': 'name'})
    if (len(featureLinks) > 0):
        for featureLink in featureLinks:
            if (featureLink.string != None):
                featureList += (('     ' + featureLink.string.replace('Seated', 'Seated VR')) + '\n')
        AllGameDetailsFormatted += ('Features:\n' + featureList)
    reviewRows = ''
    reviewDivs = soup.findAll('div', attrs={'class': 'user_reviews_summary_row'})
    if (len(reviewDivs) > 0):
        for reviewRow in reviewDivs:
            reviewSubtitleRawDiv = reviewRow.find('div', attrs={'class': 'subtitle column'})
            reviewSubtitleDiv = ''
            if (reviewSubtitleRawDiv is not None):
                reviewSubtitleDiv = reviewSubtitleRawDiv.string
            reviewSummaryRawDiv = reviewRow.find('div', attrs={'class': 'summary column'})
            reviewSummaryDiv = ''
            if (reviewSummaryRawDiv is not None):
                reviewSummaryDiv = reviewSummaryRawDiv.string
            if (not reviewSummaryDiv):
                findReviewSummaryDiv = reviewRow.find('span', attrs={'class': 'game_review_summary'})
                if findReviewSummaryDiv:
                    reviewSummaryDiv = findReviewSummaryDiv.string
            reviewSummaryDiv = reviewSummaryDiv.replace('\r', '').replace('\n', '').replace('\t', '')
            if (reviewSummaryDiv != 'No user reviews'):
                reviewRows += ((('     ' + reviewSubtitleDiv) + reviewSummaryDiv.replace('-', '').replace(' user reviews', '').replace(' of the ', ' of ')) + '\n')
        if reviewRows:
            AllGameDetailsFormatted += ('Reviews:\n' + reviewRows.replace('Recent Reviews:', ''))
        if AllGameDetailsFormatted.endswith('\n'):
            AllGameDetailsFormatted = AllGameDetailsFormatted[:AllGameDetailsFormatted.rfind('\n')]
    tagList = ''
    tagLinks = soup.findAll('a', attrs={'class': 'app_tag'})
    if (len(tagLinks) > 0):
        for tagLink in tagLinks:
            tagList += (tagLink.string.replace('\r', '').replace('\n', '').replace('\t', '') + ', ')
        AllGameDetailsFormatted += (('\n' + 'Tags:\n`') + tagList)
    if AllGameDetailsFormatted.endswith(', '):
        AllGameDetailsFormatted = AllGameDetailsFormatted[:AllGameDetailsFormatted.rfind(', ')]
        AllGameDetailsFormatted += '`'
    return AllGameDetailsFormatted
def steam_game_parser(code, link):
    soup = BeautifulSoup(code, 'html.parser')
    AllGameDetailsFormatted = 
    titleDiv = soup.find('div', attrs={'class': 'apphub_AppName'})
    if titleDiv:
        gameTitle = titleDiv.string
        AllGameDetailsFormatted += ('*' + gameTitle)
        priceDiv = soup.find('div', attrs={'class': 'game_purchase_price price'})
        if priceDiv:
            gamePrice = priceDiv.string
            AllGameDetailsFormatted += (' - ' + gamePrice.strip())
        else:
            priceDiv = soup.find('div', attrs={'class': 'discount_final_price'})
            if priceDiv:
                gamePrice = priceDiv.string
                AllGameDetailsFormatted += (' - ' + gamePrice.strip())
                discountPercentageDiv = soup.find('div', attrs={'class': 'discount_pct'})
                if discountPercentageDiv:
                    percentageDiscountedBy = discountPercentageDiv.string
                    AllGameDetailsFormatted += ((' (at ' + percentageDiscountedBy.strip()) + ' off)')
        AllGameDetailsFormatted += '*\n'
    else:
        print(('Cannot parse title as div with class apphub_AppName from Steam page for ' + link))
    descriptionDiv = soup.find('div', attrs={'class': 'game_description_snippet'})
    if descriptionDiv:
        descriptionSnippet = descriptionDiv.string.replace('\r', ).replace('\n', ).replace('\t', ).replace('_', ' ')
        AllGameDetailsFormatted += (descriptionSnippet + '\n')
    if AllGameDetailsFormatted:
        AllGameDetailsFormatted += (link + '\n')
    dateSpan = soup.find('div', attrs={'class': 'date'})
    if dateSpan:
        releaseDate = dateSpan.string
        AllGameDetailsFormatted += (('Release Date: ' + releaseDate) + '\n')
    featureList = 
    featureLinks = soup.findAll('a', attrs={'class': 'name'})
    if (len(featureLinks) > 0):
        for featureLink in featureLinks:
            if (featureLink.string != None):
                featureList += (('     ' + featureLink.string.replace('Seated', 'Seated VR')) + '\n')
        AllGameDetailsFormatted += ('Features:\n' + featureList)
    reviewRows = 
    reviewDivs = soup.findAll('div', attrs={'class': 'user_reviews_summary_row'})
    if (len(reviewDivs) > 0):
        for reviewRow in reviewDivs:
            reviewSubtitleRawDiv = reviewRow.find('div', attrs={'class': 'subtitle column'})
            reviewSubtitleDiv = 
            if (reviewSubtitleRawDiv is not None):
                reviewSubtitleDiv = reviewSubtitleRawDiv.string
            reviewSummaryRawDiv = reviewRow.find('div', attrs={'class': 'summary column'})
            reviewSummaryDiv = 
            if (reviewSummaryRawDiv is not None):
                reviewSummaryDiv = reviewSummaryRawDiv.string
            if (not reviewSummaryDiv):
                findReviewSummaryDiv = reviewRow.find('span', attrs={'class': 'game_review_summary'})
                if findReviewSummaryDiv:
                    reviewSummaryDiv = findReviewSummaryDiv.string
            reviewSummaryDiv = reviewSummaryDiv.replace('\r', ).replace('\n', ).replace('\t', )
            if (reviewSummaryDiv != 'No user reviews'):
                reviewRows += ((('     ' + reviewSubtitleDiv) + reviewSummaryDiv.replace('-', ).replace(' user reviews', ).replace(' of the ', ' of ')) + '\n')
        if reviewRows:
            AllGameDetailsFormatted += ('Reviews:\n' + reviewRows.replace('Recent Reviews:', ))
        if AllGameDetailsFormatted.endswith('\n'):
            AllGameDetailsFormatted = AllGameDetailsFormatted[:AllGameDetailsFormatted.rfind('\n')]
    tagList = 
    tagLinks = soup.findAll('a', attrs={'class': 'app_tag'})
    if (len(tagLinks) > 0):
        for tagLink in tagLinks:
            tagList += (tagLink.string.replace('\r', ).replace('\n', ).replace('\t', ) + ', ')
        AllGameDetailsFormatted += (('\n' + 'Tags:\n`') + tagList)
    if AllGameDetailsFormatted.endswith(', '):
        AllGameDetailsFormatted = AllGameDetailsFormatted[:AllGameDetailsFormatted.rfind(', ')]
        AllGameDetailsFormatted += '`'
    return AllGameDetailsFormatted