Adding replace_broken_smilies--needs completion yet.

This commit is contained in:
Jim Miller 2017-07-14 17:11:46 -05:00
parent 6da54ba6c4
commit 78c9f801a6

View file

@ -518,7 +518,8 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
def _do_utf8FromSoup(self,url,soup,fetch=None,allow_replace_br_with_p=True):
if self.getConfig('replace_broken_smilies'):
for img in soup.find_all('img',src=re.compile(r'(failedtodownload|clear.png)$')):
for img in soup.find_all('img',src=re.compile(r'(failedtoload|clear.png)$')):
logger.debug("replace_broken_smilies? %s"%img)
clses = unicode(img['class']) # stringify.
if img.has_attr('alt') and 'mceSmilie' in clses :
## put a span around the clear image with alt text instead?