Handle /post-# urls better in base_xenforoforum_adapter

This commit is contained in:
Jim Miller 2021-02-14 11:01:51 -06:00
parent aed2c5743f
commit 591bcc663b

View file

@ -649,6 +649,8 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
postid = "post-"+postid.split('/')[-2]
elif '#post-' in postid:
postid = postid.split('#')[1]
elif '/post-' in postid:
postid = "post-"+postid.split('/post-')[-1]
# logger.debug("get cache %s %s"%(postid,postid in self.post_cache))
return self.post_cache.get(postid,None)