1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[chan] unescape title

This commit is contained in:
Mike Fährmann 2015-11-11 00:51:07 +01:00
parent 20845d86f8
commit 129ca282e4
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -42,6 +42,5 @@ class ChanExtractor(Extractor):
@staticmethod
def get_thread_title(post):
"""Return thread title from first post"""
if "sub" in post:
return post["sub"]
return text.unescape(text.remove_html(post["com"]))[:50]
title = post["sub"] if "sub" in post else text.remove_html(post["com"])
return text.unescape(title)[:50]