diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-06-09 10:36:52 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-06-09 10:36:52 -0700 |
commit | 26fec949ac99c0117a75dc0558fd7d1b905ac387 (patch) | |
tree | a0b4c391d7b7c18a538d0953fd352e0f1dd949fb | |
parent | d739ff7f59931ae4bf6d878d1879f568cf349dd7 (diff) | |
download | my_new_personal_website-26fec949ac99c0117a75dc0558fd7d1b905ac387.tar.xz my_new_personal_website-26fec949ac99c0117a75dc0558fd7d1b905ac387.zip |
pyblog: extract script tags from feeds
Fixes #2.
-rwxr-xr-x | pyblog | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -390,6 +390,9 @@ def generate_index_and_feed(): # remove line numbers for line_number_span in article.find_all("span", attrs={"class": "line-number"}): line_number_span.extract() + # remove script tags + for script_tag in article.find_all("script"): + script_tag.extract() entry.content_html = ''.join([str(content) for content in article.contents]) entry.content = ET.Element("content", type="html") |