mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Fix forumtags for XF2 changes.
This commit is contained in:
parent
2a95105837
commit
01e34ca0eb
2 changed files with 7 additions and 1 deletions
|
|
@ -57,6 +57,9 @@ class BaseXenForo2ForumAdapter(BaseXenForoForumAdapter):
|
|||
self.story.setMetadata('title',stripHTML(h1))
|
||||
# logger.debug(stripHTML(h1))
|
||||
|
||||
def get_forumtags(self,topsoup):
|
||||
return topsoup.find('div',{'class':'p-description'}).findAll('a',{'class':'tagItem'})
|
||||
|
||||
def parse_author(self,souptag):
|
||||
a = souptag.find('section',{'class':'message-user'}).find('a',{'class':'username'})
|
||||
# logger.debug(a)
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
|
|||
|
||||
if use_threadmark_chaps or self.getConfig('always_use_forumtags'):
|
||||
## only use tags if threadmarks for chapters or always_use_forumtags is on.
|
||||
for tag in topsoup.findAll('a',{'class':'tag'}) + topsoup.findAll('span',{'class':'prefix'}):
|
||||
for tag in self.get_forumtags(topsoup):
|
||||
tstr = stripHTML(tag)
|
||||
if self.getConfig('capitalize_forumtags'):
|
||||
tstr = tstr.title()
|
||||
|
|
@ -535,6 +535,9 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
|
|||
tag.extract()
|
||||
self.story.setMetadata('title',stripHTML(h1))
|
||||
|
||||
def get_forumtags(self,topsoup):
|
||||
return topsoup.findAll('a',{'class':'tag'}) + topsoup.findAll('span',{'class':'prefix'})
|
||||
|
||||
def parse_author(self,souptag):
|
||||
a = souptag.find('h3',{'class':'userText'}).find('a')
|
||||
self.story.addToList('authorId',a['href'].split('/')[1])
|
||||
|
|
|
|||
Loading…
Reference in a new issue