Unescapes HTML encoding from game description
This commit is contained in:
parent
2c26e87ec5
commit
58746833bd
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ from datetime import datetime
|
||||||
import time
|
import time
|
||||||
import math
|
import math
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
import html
|
||||||
|
|
||||||
from src.classes import boardgame_classes, play_classes
|
from src.classes import boardgame_classes, play_classes
|
||||||
from src.modules import auth_manager
|
from src.modules import auth_manager
|
||||||
|
|
@ -74,7 +75,7 @@ def convert_xml_to_boardgame(boardgame_xml: ET.Element) -> boardgame_classes.Boa
|
||||||
"id" : int(boardgame_xml.get('id')),
|
"id" : int(boardgame_xml.get('id')),
|
||||||
"name" : boardgame_xml.find('name').get('value'),
|
"name" : boardgame_xml.find('name').get('value'),
|
||||||
"weight": boardgame_xml.find('statistics').find('ratings').find('averageweight').get('value'),
|
"weight": boardgame_xml.find('statistics').find('ratings').find('averageweight').get('value'),
|
||||||
"description" : boardgame_xml.find('description').text,
|
"description" : html.unescape(boardgame_xml.find('description').text),
|
||||||
"image_url" : boardgame_xml.find('image').text,
|
"image_url" : boardgame_xml.find('image').text,
|
||||||
"thumbnail_url" : boardgame_xml.find('thumbnail').text,
|
"thumbnail_url" : boardgame_xml.find('thumbnail').text,
|
||||||
"year_published" : int(boardgame_xml.find('yearpublished').get('value')),
|
"year_published" : int(boardgame_xml.find('yearpublished').get('value')),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue