diff --git a/lib/WPImport.py b/lib/WPImport.py index 6e5ab5b..dbffb0f 100644 --- a/lib/WPImport.py +++ b/lib/WPImport.py @@ -528,11 +528,17 @@ class WPimport: count = 0 for i in result: self._logger.info("{0} : Search title posts for |{2}| : |{1}|".format(self._name, i["title"]["rendered"], title)) - title_rendered = i["title"]["rendered"].replace('’', "'") - title_rendered = title_rendered.replace('–', '-') - title_rendered = title_rendered.replace('…', '...') - title_rendered = title_rendered.replace('« ', '"') - title_rendered = title_rendered.replace(' »', '"') + if len(i["title"]["rendered"]) == len(title): + title_rendered = i["title"]["rendered"] + else: + title_rendered = i["title"]["rendered"].replace('’', "'") + title_rendered = title_rendered.replace('–', '-') + title_rendered = title_rendered.replace('…', '...') + title_rendered = title_rendered.replace('« ', '"') + title_rendered = title_rendered.replace(' »', '"') + title_rendered = title_rendered.replace('« ', '"') + title_rendered = title_rendered.replace(' »', '"') + title_rendered = title_rendered.replace('’', "'") self._logger.debug("{0} : Search title posts for |{2}| : |{1}|".format(self._name, title_rendered, title)) self._logger.debug("{0} : SIze of title : {1} - {2}".format(self._name, len(title), len(title_rendered))) if title_rendered == title: