From a4aa01d194064182678706208234b6731bba1f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=ADque=20Coelho?= Date: Sun, 8 Mar 2020 20:47:31 -0300 Subject: [PATCH 1/2] removed breaked author comment name --- inscrawler/fetch.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/inscrawler/fetch.py b/inscrawler/fetch.py index 9f1d8df..6391459 100644 --- a/inscrawler/fetch.py +++ b/inscrawler/fetch.py @@ -148,16 +148,12 @@ def fetch_comments(browser, dict_post): ele_comments = browser.find(".eo2As .gElp9") comments = [] for els_comment in ele_comments[1:]: - author = browser.find_one(".FPmhX", els_comment).text - temp_element = browser.find("span", els_comment) for element in temp_element: + comment = element.text - if element.text not in ['Verified','']: - comment = element.text - - comment_obj = {"author": author, "comment": comment} + comment_obj = {"comment": comment} fetch_mentions(comment, comment_obj) fetch_hashtags(comment, comment_obj) From 41768694f89535075eebcc8e5b71dc7b4f3a3cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=ADque=20Coelho?= Date: Sun, 8 Mar 2020 21:01:44 -0300 Subject: [PATCH 2/2] fixed inconsistent use of tabs and spaces in indentation --- inscrawler/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inscrawler/fetch.py b/inscrawler/fetch.py index 6391459..22d604a 100644 --- a/inscrawler/fetch.py +++ b/inscrawler/fetch.py @@ -151,7 +151,7 @@ def fetch_comments(browser, dict_post): temp_element = browser.find("span", els_comment) for element in temp_element: - comment = element.text + comment = element.text comment_obj = {"comment": comment}