From ab5cfe1ded9c6946260ea54ef02a9bc64bbef633 Mon Sep 17 00:00:00 2001 From: sl4vkek <43294802+sl4vkek@users.noreply.github.com> Date: Sun, 12 May 2019 16:00:24 +0300 Subject: [PATCH] Add files via upload --- setup.py | 2 +- ynet/__init__.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index c09a0b9..49a43cf 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from distutils.core import setup setup(name='ynet', - version='1.6.4', + version='1.6.5', description='ynet.co.il interaction library', long_description='A Python library that allows you to interact with comments from news articles on ynet.co.il and ynetnews.com.', author='sl4v', diff --git a/ynet/__init__.py b/ynet/__init__.py index 87ac26c..ec62926 100644 --- a/ynet/__init__.py +++ b/ynet/__init__.py @@ -7,8 +7,6 @@ class Comment: - hasParentComment = False - def __init__(self, article_url='', name='', email='', location='', title='', text='', likes=0, commentNum=0, commentDate=None, commentId=0, parentId=0): self.article = Article(article_url) self.name = name @@ -21,8 +19,10 @@ def __init__(self, article_url='', name='', email='', location='', title='', tex self.commentDate = commentDate self.commentId = commentId self.parentId = parentId - if parentId != 0: - self.hasParentComment = True + if parentId == 0: + self.isReply = False + else: + self.isReply == True def GetReplies(self): all_comments = self.article.GetComments()