Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. artLink = 'sciencedirect.com{}'.format(link)
  2.  
  3. artRes = requests.get(artLink)
  4.  
  5. artSoup = BeautifulSoup(artRes.content, 'html.parser')
  6.  
  7. aff = artSoup.find_all('script', {
  8.     'type': 'application/json'
  9. })
  10.  
  11. jdata = json.loads((aff[0].text))
  12.  
  13. for affNum in jdata['authors']['affiliations']:
  14.     afflication = jdata['authors']['affiliations'][affNum]['$$'][1]['_']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement