def process_comment(self, comment): result = Comment() # Get content result.content = comment.find("div", attrs={"class": "comment_content"}).text.strip() # Get rating result.rating = int(comment.find("ins").text.replace("+", "")) # Get author result.author = comment.find("a", attrs={"href": re.compile("profile")}).text.strip() # Get date result.date = comment.find("span", attrs={"class": "gray1"}).text.split("wrote on ")[-1].strip() return result