Link to parent, version bump, add iichan

This commit is contained in:
2019-09-14 11:10:09 -04:00
parent 8ef56871a9
commit 828a14ee98
14 changed files with 156 additions and 24 deletions

View File

@@ -56,16 +56,18 @@ class DoushioHtmlChanHelper(ChanHelper):
soup = BeautifulSoup(r.content.decode('utf-8', 'ignore'), "html.parser")
op_el = soup.find("section")
tid = int(op_el.get("id"))
for post_el in op_el.find_all("article"):
yield {
"id": int(post_el.get("id")),
"type": "post",
"html": str(post_el),
"time": int(parser.parse(post_el.find("header").find("time").get("datetime")).timestamp())
"time": int(parser.parse(post_el.find("header").find("time").get("datetime")).timestamp()),
"parent": tid
}
post_el.decompose()
yield {
"id": int(op_el.get("id")),
"id": tid,
"type": "thread",
"html": str(op_el),
"time": int(parser.parse(op_el.find("header").find("time").get("datetime")).timestamp())