diff options
author | Ken Kellner <ken@kenkellner.com> | 2018-04-13 16:16:30 -0400 |
---|---|---|
committer | Ken Kellner <ken@kenkellner.com> | 2018-04-13 16:16:30 -0400 |
commit | d4694660aa3df9515f7aa3a6ad9d9b906e662a24 (patch) | |
tree | 344b18c6bbdeff022435729754ebb3f807ddb71a | |
parent | 0124785e6616dd4fca06af50b745f14e6e07819e (diff) |
Fix some issues with formulas
-rw-r--r-- | article_epub/publishers/bioone.py | 7 | ||||
-rw-r--r-- | article_epub/publishers/nrc.py | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/article_epub/publishers/bioone.py b/article_epub/publishers/bioone.py index 4d112fa..dcc0bab 100644 --- a/article_epub/publishers/bioone.py +++ b/article_epub/publishers/bioone.py @@ -58,7 +58,12 @@ class BioOne(Publisher): link['href'] = '' except: pass - + + formulas = body_full.find_all('table',class_='formula') + for i in formulas: + link = 'http://bioone.org'+str(i.find('img')['src']) + i.find('img')['src'] = link + body_raw = body_full.find_all('div',class_='NLM_sec_level_1') self.body = '' for i in body_raw: diff --git a/article_epub/publishers/nrc.py b/article_epub/publishers/nrc.py index d039986..57c5f75 100644 --- a/article_epub/publishers/nrc.py +++ b/article_epub/publishers/nrc.py @@ -62,6 +62,10 @@ class NRC(Publisher): else: print('Unable to get table images') + for i in body_raw.find_all('alternatives'): + link = 'http://nrcresearchpress.com'+i.find('img')['src'] + i.find('img')['src'] = link + for i in body_raw.find_all('a',class_='openLayerForItem'): i['href'] = '#'+i['itemid'] |