diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-22 00:28:44 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-22 00:28:44 +0100 |
| commit | 4565c1d602090b393b27a965178203d6ad950100 (patch) | |
| tree | ec14c3899f518885b45d4130191a57bf0c8779e8 /scraper | |
| parent | 35f19bdca7ac68829fd781827d25deb4bfc734d2 (diff) | |
paper verify stuff
Diffstat (limited to 'scraper')
| -rw-r--r-- | scraper/client/paper/paper.verify.js | 8 | ||||
| -rw-r--r-- | scraper/util.py | 24 |
2 files changed, 19 insertions, 13 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js index ddc0a155..8cb14d84 100644 --- a/scraper/client/paper/paper.verify.js +++ b/scraper/client/paper/paper.verify.js @@ -145,7 +145,13 @@ class PaperVerify extends Component { ) })} {' | '} - <a href={'https://www.semanticscholar.org/paper/' + citation.id} target="_blank">[semantic scholar]</a> + <a + href={'https://www.semanticscholar.org/paper/' + citation.id} + target="_blank" + className={i === this.state.pdf_index ? 'selected pdfLink' : 'pdfLink'} + > + {'[semantic scholar]'} + </a> </div> <div className='param'> diff --git a/scraper/util.py b/scraper/util.py index 830dbe8b..1ee2ad52 100644 --- a/scraper/util.py +++ b/scraper/util.py @@ -347,22 +347,22 @@ def load_institutions(paperId, paper_location_lookup={}): if paperId in paper_location_lookup: items = paper_location_lookup[paperId] result = [] - if items['institution_1']: + if items['validate_1'] == 'TRUE': result.append(['', items['institution_1'], '', '']) - if items['institution_2']: + if items['validate_2'] == 'TRUE': result.append(['', items['institution_2'], '', '']) - if items['institution_3']: + if items['validate_3'] == 'TRUE': result.append(['', items['institution_3'], '', '']) - if items['institution_4']: + if items['validate_4'] == 'TRUE': result.append(['', items['institution_4'], '', '']) - if items['institution_5']: - result.append(['', items['institution_5'], '', '']) - if items['institution_6']: - result.append(['', items['institution_6'], '', '']) - if items['institution_7']: - result.append(['', items['institution_7'], '', '']) - if items['institution_8']: - result.append(['', items['institution_8'], '', '']) + # if items['validate_5'] == 'TRUE': + # result.append(['', items['institution_5'], '', '']) + # if items['validate_6'] == 'TRUE': + # result.append(['', items['institution_6'], '', '']) + # if items['validate_7'] == 'TRUE': + # result.append(['', items['institution_7'], '', '']) + # if items['validate_8'] == 'TRUE': + # result.append(['', items['institution_8'], '', '']) return result if os.path.exists(file_path('pdf', paperId, 'institutions.json')): return read_json(file_path('pdf', paperId, 'institutions.json'))['institutions'] |
