fix title rendered
This commit is contained in:
parent
3718b807ba
commit
0fc6e78a18
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user