aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2019-01-22 20:20:48 +0100
committerFélix Sipma <felix.sipma@no-log.org>2019-01-22 20:20:48 +0100
commit37660ba66fd7023d450d6246807de4991d79d004 (patch)
treed18a132e13c496ca2e02aee8c0f72b9017142ba3
parentf244c56b26db3e31291c36f76ddf8838e5ca38e7 (diff)
update confederationpaysanne.py filter
-rwxr-xr-xdoc/filters/confederationpaysanne.py25
1 files changed, 3 insertions, 22 deletions
diff --git a/doc/filters/confederationpaysanne.py b/doc/filters/confederationpaysanne.py
index 09a52d6..6db001e 100755
--- a/doc/filters/confederationpaysanne.py
+++ b/doc/filters/confederationpaysanne.py
@@ -80,7 +80,7 @@ if not feed_title:
entries = []
if soup.body.find("div", {"id": "res-recherche"}):
- content = soup.body.find("div", {"id": "res-recherche"}).findAll("div", {"class": "d-text" })
+ content = soup.body.find("div", {"id": "res-recherche"}).findAll("div", {"class": "d-texte" })
for section in content:
entry = {
'title': "",
@@ -102,27 +102,8 @@ if soup.body.find("div", {"id": "res-recherche"}):
)
## content
- entry['content'] = nextNode.text
-
- #entrycontent = []
- #while True:
- # try:
- # nextNode = nextNode.nextSibling
- # if nextNode:
- # entrycontent.append(unicode(nextNode))
- # except AttributeError:
- # break
- # try:
- # tag_name = nextNode.name
- # except AttributeError:
- # tag_name = ""
- # if tag_name == "span":
- # rawdate = nextNode.find("span", {"class": "f-date"}).text
- # if rawdate:
- # entry['date'] = rawdate
- # elif tag_name == "hr":
- # break
- #entry['content'] = entrycontent
+ entry['content'] = nextNode.get_text().strip().splitlines()
+
entries.append(entry)