diff --git a/oloturia2pdf.py b/oloturia2pdf.py index 0106cac..98952d6 100755 --- a/oloturia2pdf.py +++ b/oloturia2pdf.py @@ -10,6 +10,7 @@ import html2text import pdfkit import locale import PyPDF2 +import html locale.setlocale(locale.LC_TIME, 'it_IT.UTF-8') @@ -161,9 +162,15 @@ def main(): for vgo in all_vgos: vgo_num = html2text.html2text(vgo['content']).split(' ')[0] - vgo_name = os.linesep.join([s for s in html2text.html2text(vgo['content']).splitlines() if s]).splitlines()[-1] - if len(vgo_name) < 10: - vgo_name = [s for s in html2text.html2text(vgo['content']).split("\n\n") if s][-1].replace("\n"," ") + # vgo_name = os.linesep.join([s for s in html2text.html2text(vgo['content']).splitlines() if s]).splitlines()[-1] + # if len(vgo_name) < 10: + # vgo_name = [s for s in html2text.html2text(vgo['content']).split("\n\n") if s][-1].replace("\n"," ") + + vgo_name = vgo['content'].split("
")[-1].replace("
","") + vgo_name = vgo_name.split("