From 0d71e3afe84eee6772ae320d21606153ae0decfb Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 23 Aug 2019 22:38:52 -0500 Subject: [PATCH] Add URL prefix for XF2 authorUrl if relative. --- fanficfare/adapters/base_xenforo2forum_adapter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fanficfare/adapters/base_xenforo2forum_adapter.py b/fanficfare/adapters/base_xenforo2forum_adapter.py index 9fcb12ed..8a6c0f17 100644 --- a/fanficfare/adapters/base_xenforo2forum_adapter.py +++ b/fanficfare/adapters/base_xenforo2forum_adapter.py @@ -147,7 +147,9 @@ class BaseXenForo2ForumAdapter(BaseXenForoForumAdapter): a = souptag.find('section',{'class':'message-user'}).find('a',{'class':'username'}) # logger.debug(a) self.story.addToList('authorId',a['href'].split('/')[-2]) - authorUrl = a['href'] # self.getURLPrefix()+'/'+a['href'] + authorUrl = a['href'] + if not authorUrl.startswith('http'): + authorUrl = self.getURLPrefix()+authorUrl self.story.addToList('authorUrl',authorUrl) self.story.addToList('author',a.text)