(self, weibo, comments)
| 2576 | logger.exception(e) |
| 2577 | |
| 2578 | def sqlite_insert_comments(self, weibo, comments): |
| 2579 | if not comments or len(comments) == 0: |
| 2580 | return |
| 2581 | con = self.get_sqlite_connection() |
| 2582 | for comment in comments: |
| 2583 | data = self.parse_sqlite_comment(comment, weibo) |
| 2584 | self.sqlite_insert(con, data, "comments") |
| 2585 | if "comments" in comment and isinstance(comment["comments"], list): |
| 2586 | for c in comment["comments"]: |
| 2587 | data = self.parse_sqlite_comment(c, weibo) |
| 2588 | self.sqlite_insert(con, data, "comments") |
| 2589 | con.close() |
| 2590 | |
| 2591 | def sqlite_insert_reposts(self, weibo, reposts): |
| 2592 | if not reposts or len(reposts) == 0: |
nothing calls this directly
no test coverage detected