Update adapter_storiesonlinenet.py

Removed extraneous parens on conditional 'if' statements
This commit is contained in:
Brian 2025-10-31 22:50:56 -07:00 committed by GitHub
parent e2961eaadf
commit 20681315e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,7 +209,7 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
## regardless. ## regardless.
soup = self.make_soup(data) soup = self.make_soup(data)
a = soup.find('a',rel="bookmark") a = soup.find('a',rel="bookmark")
if (a): if a:
url = 'https://'+self.host+a['href'] url = 'https://'+self.host+a['href']
else: else:
# Contest entries do not have bookmark HREF # Contest entries do not have bookmark HREF
@ -248,7 +248,7 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
authfrom = soup.find('footer') authfrom = soup.find('footer')
alist = authfrom.find_all('a', {'rel' : 'author'}) alist = authfrom.find_all('a', {'rel' : 'author'})
if (alist): if alist:
for a in alist: for a in alist:
self.story.addToList('authorId',a['href'].split('/')[2]) self.story.addToList('authorId',a['href'].split('/')[2])
self.story.addToList('authorUrl','https://'+self.host+a['href']) self.story.addToList('authorUrl','https://'+self.host+a['href'])
@ -274,7 +274,7 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
# The rest of the metadata is within the article tag. # The rest of the metadata is within the article tag.
soup = soup.find('article') soup = soup.find('article')
if (self.story.getList('authorUrl')): if self.story.getList('authorUrl'):
self.getStoryMetadataFromAuthorPage() self.getStoryMetadataFromAuthorPage()
else: else:
logger.info("No authorurl found, could be contest story...") logger.info("No authorurl found, could be contest story...")