Get game description from meta tags - no pesky HTML to strip

This commit is contained in:
Luke Rogers 2014-02-13 12:00:33 +13:00
parent 1c9216ac1d
commit 10ef353782
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ def get_steam_info(url):
data = {}
data["name"] = soup.find('div', {'class': 'apphub_AppName'}).text
data["desc"] = truncate_str(soup.find('div', {'class': 'game_description_snippet'}).text.strip())
data["desc"] = truncate_str(soup.find('meta', {'name': 'description'})['content'].strip(), 80)
# get the element details_block
details = soup.find('div', {'class': 'details_block'})