mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-07 12:02:25 +02:00
fix(adapter_literotica): handle both string and integer tag values in add_chapter method
This commit is contained in:
parent
16f2c74e4b
commit
10975e970e
1 changed files with 6 additions and 1 deletions
|
|
@ -395,7 +395,12 @@ class LiteroticaSiteAdapter(BaseSiteAdapter):
|
|||
|
||||
## Collect tags from series/story page if tags_from_chapters is enabled
|
||||
if self.getConfig("tags_from_chapters"):
|
||||
self.story.extendList('eroticatags', [ stripHTML(t['tag']).title() for t in chap['tags'] ])
|
||||
for t in chap['tags']:
|
||||
tag_value = t['tag']
|
||||
# Handle both string and integer tag values (e.g., tag 69)
|
||||
if isinstance(tag_value, int):
|
||||
tag_value = unicode(tag_value)
|
||||
self.story.addToList('eroticatags', stripHTML(tag_value).title())
|
||||
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Reference in a new issue