diff options
author | Ken Kellner <ken@kenkellner.com> | 2018-04-18 16:17:19 -0400 |
---|---|---|
committer | Ken Kellner <ken@kenkellner.com> | 2018-04-18 16:17:19 -0400 |
commit | f2029998c90f7ebf7a108011fd508eb1c2c00d24 (patch) | |
tree | d95c3aa53d56a80beb32016dec24802caa0366a3 | |
parent | e67799a4d254fd1d9c5082cf664e8ccc40bf341a (diff) |
Some bugfixes
-rw-r--r-- | article_epub/publishers/oxford.py | 5 | ||||
-rw-r--r-- | article_epub/publishers/wiley.py | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/article_epub/publishers/oxford.py b/article_epub/publishers/oxford.py index 948ec6f..0b86191 100644 --- a/article_epub/publishers/oxford.py +++ b/article_epub/publishers/oxford.py @@ -45,7 +45,10 @@ class Oxford(Publisher): except: pass body_raw.find('section',class_='abstract').decompose() - body_raw.find('div',class_='article-metadata-panel').decompose() + try: + body_raw.find('div',class_='article-metadata-panel').decompose() + except: + pass body_raw.find('div',class_='ref-list').decompose() body_raw.find('span',{'id':'UserHasAccess'}).decompose() body_raw.find('div',class_='copyright').decompose() diff --git a/article_epub/publishers/wiley.py b/article_epub/publishers/wiley.py index de15213..6d40491 100644 --- a/article_epub/publishers/wiley.py +++ b/article_epub/publishers/wiley.py @@ -12,7 +12,8 @@ class Wiley(Publisher): self.url = self.url.replace('/abs/','/full/') def check_fulltext(self): - if self.soup.find('section',class_='article-section__full') == None: + if self.soup.find('section',class_='article-section__full') \ + .find('div',class_='article-section__content').text == '\n\xa0\n': sys.exit('Error: Can\'t access fulltext of article') else: return(True) |