mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 00:43:00 +01:00
Update adapter_storiesonlinenet.py
Removed extraneous parens on conditional 'if' statements
This commit is contained in:
parent
e2961eaadf
commit
20681315e7
1 changed files with 3 additions and 3 deletions
|
|
@ -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...")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue