adapter_fireflyfansnet: Allow for missing authorId.

This commit is contained in:
Jim Miller 2025-08-22 11:19:01 -05:00
parent 2e8a899d8c
commit 9dadef1905

View file

@ -93,6 +93,9 @@ class FireFlyFansNetSiteAdapter(BaseSiteAdapter):
a = soup.find('a', href=re.compile(r"profileshow.aspx\?u="))
self.story.setMetadata('authorId', a['href'].split('=')[1])
if not self.story.getMetadata('authorId'):
logger.warning("Site authorUrl missing authorId, using SiteMissingAuthorId")
self.story.setMetadata('authorId', 'SiteMissingAuthorId')
self.story.setMetadata('authorUrl', 'http://' +
self.host + '/' + a['href'])
self.story.setMetadata('author', a.string)