0

Let's say we have a data on a webpage (for example: "Name: Bill Gates"). When we inspect the data on the browser we find:

<b> Name </b>: Bill Gates

but when we scrape it using BeautifulSoup, the name is actually a variable (like in jinja template) and we end up with

<b> Name </b>: {{ name }} 

Is there a way to extract the {{ name }} value (i.e. "Bill Gates") using BeautifulSoup ?

I didn't find an answer to that on internet (maybe didn't use the right keywords? any suggestions ?)

(Example: extracting names from https://orcid.org/orcid-search/quick-search/?searchQuery=mario%20franca)

Yassine
  • 189
  • 1
  • 1
  • 10
  • 2
    This will not be Jinja, but some kind of front-end templating system, possibly Angular. – Daniel Roseman Dec 03 '19 at 10:44
  • 1
    As stated above, probably the html template for angular. If you provide the url I can look to see if it's within the script tags, or if there's a separate request made to get that data. – chitown88 Dec 03 '19 at 10:51
  • I just edited the post with the example website. It's within a script tags. I got to the script data but I can't extract the variables values. – Yassine Dec 03 '19 at 10:58
  • So… you want "Bill Gates" as result, or "{{ name }}"…? – deceze Dec 03 '19 at 10:59
  • I want "Bill Gates" – Yassine Dec 03 '19 at 11:00
  • @Yassine , the question was closed before I could post my solution. I don't think it's as straight forward as posted in duplicate question link. Shoot me an email and I give you my solution jason.schvach@gmail.com – chitown88 Dec 03 '19 at 12:04

0 Answers0