From f4900d6d29b61c880b785818a99ad5d071092f4c Mon Sep 17 00:00:00 2001 From: Joshua Kissoon Date: Wed, 1 May 2019 23:10:49 -0400 Subject: [PATCH] Fixed an issue where "Shar" was being returned as the number of comments on posts without comments --- fbcrawl/items.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fbcrawl/items.py b/fbcrawl/items.py index b2a09f7..1f95b6e 100644 --- a/fbcrawl/items.py +++ b/fbcrawl/items.py @@ -18,6 +18,8 @@ def comments_strip(string,loader_context): return string[0].rstrip(' commenti') elif lang == 'en': + if(string[0] == 'Share'): + return '0' new_string = string[0].rstrip(' Comments') while new_string.rfind(',') != -1: new_string = new_string[0:new_string.rfind(',')] + new_string[new_string.rfind(',')+1:]