diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-01 13:33:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-01 13:33:38 +0200 |
commit | 339ecc4c7b56f9532a0fe30741962b62538d9a2e (patch) | |
tree | 51c68189ae5543c865d73777105a5f9978a4ec2d | |
parent | 83a52b012bfa838e805d7c600facf8d4c09cf011 (diff) | |
download | www_shared-339ecc4c7b56f9532a0fe30741962b62538d9a2e.tar.gz www_shared-339ecc4c7b56f9532a0fe30741962b62538d9a2e.zip |
fix rss generation
-rw-r--r-- | textproc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/textproc.py b/textproc.py index 0c68d08..5cf9877 100644 --- a/textproc.py +++ b/textproc.py | |||
@@ -69,7 +69,7 @@ def cut_article(filename, conf, lang): | |||
69 | def cut_all(filename, conf, lang): | 69 | def cut_all(filename, conf, lang): |
70 | with open(filename) as html: | 70 | with open(filename) as html: |
71 | soup = BeautifulSoup(html, features="lxml") | 71 | soup = BeautifulSoup(html, features="lxml") |
72 | i = repr(soup).replace('{% extends "common/news.j2" %}\n{% block body_content %}\n', "").replace('\n{% endblock body_content %}', "") | 72 | i = repr(soup).replace('{% extends "common/news.j2" %}\n{% block body_content %}\n', "").replace('\n{% endblock body_content %}', "").replace('<html><body><p></p>',"").replace('</body></html>', "") |
73 | urlstr = "https://" + conf["siteconf"][0]["baseurl"] + "/" + lang + "/" | 73 | urlstr = "https://" + conf["siteconf"][0]["baseurl"] + "/" + lang + "/" |
74 | text = i.replace("\n", "").replace("{{ url_localized('", urlstr).replace("') }}", "") | 74 | text = i.replace("\n", "").replace("{{ url_localized('", urlstr).replace("') }}", "") |
75 | # .replace('<', '<').replace('>', '>').replace('"', '"') | 75 | # .replace('<', '<').replace('>', '>').replace('"', '"') |