Skip to content

Commit bcc6584

Browse files
committed
Fix title detection
1 parent cd4c73c commit bcc6584

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

modules/parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ def add_downloads():
167167
div.insert_after(html.new_string("\n"))
168168
plain = sanitize_whitespace(post.find("article").get_text(separator="", strip=False))
169169

170-
name = fixed_spaces(sanitize_whitespace(re.search(r"(?:.+? - )*([^\[\|]+)", html.title.text).group(1)))
170+
name = ""
171+
for elem in html.find(is_class("p-title-value")).children:
172+
if not is_class("labelLink")(elem) and not is_class("label-append")(elem):
173+
name += elem.text
174+
name = fixed_spaces(sanitize_whitespace(re.search(r"^\s*(.*?)(?:\s*\[.*?\]\s*)*$", name).group(1)))
171175

172176
developer = get_game_attr(
173177
"developer/publisher",

0 commit comments

Comments
 (0)