diff options
Diffstat (limited to 'article_epub/publishers/wiley.py')
-rw-r--r-- | article_epub/publishers/wiley.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/article_epub/publishers/wiley.py b/article_epub/publishers/wiley.py index 9f08c59..ca4a64e 100644 --- a/article_epub/publishers/wiley.py +++ b/article_epub/publishers/wiley.py @@ -13,15 +13,18 @@ class Wiley(Publisher): def check_fulltext(self): full = self.soup.find('section',class_='article-section__full') - if full != None: - if full.find('div',class_='article-section__content') \ - .text == '\n\xa0\n': - sys.exit('Error: Can\'t access fulltext of article') + try: + if full != None: + if full.find('div',class_='article-section__content') \ + .text == '\n\xa0\n': + sys.exit('Error: Can\'t access fulltext of article') + else: + return(True) else: - return(True) - else: + sys.exit('Error: Can\'t access fulltext of article') + except: sys.exit('Error: Can\'t access fulltext of article') - + def get_doi(self): if self.doi == None: doi_raw = self.soup.find('a',class_='epub-doi').text.split('/') |